Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3426141imu; Sun, 11 Nov 2018 14:49:53 -0800 (PST) X-Google-Smtp-Source: AJdET5cvmDOFCRlVYhqFEpxG9r8loiaEPOju/fIbO+Pq6IEMgXiJaceLLNcZuQOxiapipcj46Z2Y X-Received: by 2002:a63:c642:: with SMTP id x2-v6mr14939077pgg.16.1541976593745; Sun, 11 Nov 2018 14:49:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976593; cv=none; d=google.com; s=arc-20160816; b=hx8uR3sDV75bC1CtQW31bMko3rxDOFrddV7vstFiRtCP5Kt+f6b44uCU8Aqhmsjymg 6H0Fhucqmnl6cM9ovlXPbNQ7hhTzdXbMvceRlhZYUpV65N9bthGOFBhgjHyyhU699w9o II7dF6UYxc1MzBegul2cbNUHT7Op4ozbnKfevwRYpnyS8JcDyxT0Z7TYWLYViwheHcHc Go0feKWBfMow4ePGrGS2qmPvuXUtf8SuRLTF2nmOB+gepZpugnn3kAZWPnk+KyNck1b2 Iu/2B8RI3aEpWASWKPmjI/gHupmSQqLR7bCT+/y6TUnHRZMG/Cl7Yz3UwJp01tmJbHOX ml6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WmthUstZ1trZ+3ZC3D6ni4MmFojMZfAHZyEycv0PG/8=; b=QjWHwZ2Y6ZVhNS8LRo75oRg5yjyLe5edAmYk+ITWlRrtAU9aJniZ5Vdu/g5el/Tc+B Pq+nkybuxEuVne9AdeiKFJffk8JLpMxdF3qpEg6GE47Lgu3GpDrCAFRnhW9++Kxf/daj MrmJcYrbs46a7FvVmxpXoz8wJZdRwwYYocKc86aMrKpAUK2YzYAC6uncKE83ZDJw6qze 9FzHH6lmPav+XlpD1UBD4lfLu1Rg+FBG56q5c2QO9wUYW97Yd+AAvSpOkE3U6E6+rS0A 9ZThsvzFaBEuuszjKbb58k1J5u+DJl3iG3QQMDPYb2P2dpX3/6h1SWJdDSdV3kz9hHcI obJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NPWHFk8e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c126-v6si16111766pfg.215.2018.11.11.14.49.38; Sun, 11 Nov 2018 14:49:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NPWHFk8e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390917AbeKLIjV (ORCPT + 99 others); Mon, 12 Nov 2018 03:39:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:56592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404336AbeKLIXS (ORCPT ); Mon, 12 Nov 2018 03:23:18 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0559F21582; Sun, 11 Nov 2018 22:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975601; bh=KSeLQHAnSfOy6LeboWhKm0EnyMJZgIh/XPON6JKrl0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPWHFk8eTenycLG4cJrpDPF1KGOGrEGJztSeU2QHlaGBn3Umspakntc2UF4ccgEAg E7+MjJhXzdfSanRESFlp2hWqe4mlrbBLaaUmTdYK7PSSyzMwh+DAZ/6q9sOtiuLHiz okjr4SQdgkMS3bYLwZlxhBJB5uT41MxGwpBwr1Mw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Filipe Manana , Josef Bacik , David Sterba Subject: [PATCH 4.14 216/222] btrfs: dont run delayed_iputs in commit Date: Sun, 11 Nov 2018 14:25:13 -0800 Message-Id: <20181111221705.695071899@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik commit 30928e9baac238a7330085a1c5747f0b5df444b4 upstream. This could result in a really bad case where we do something like evict evict_refill_and_join btrfs_commit_transaction btrfs_run_delayed_iputs evict evict_refill_and_join btrfs_commit_transaction ... forever We have plenty of other places where we run delayed iputs that are much safer, let those do the work. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/transaction.c | 9 --------- 1 file changed, 9 deletions(-) --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -2307,15 +2307,6 @@ int btrfs_commit_transaction(struct btrf kmem_cache_free(btrfs_trans_handle_cachep, trans); - /* - * If fs has been frozen, we can not handle delayed iputs, otherwise - * it'll result in deadlock about SB_FREEZE_FS. - */ - if (current != fs_info->transaction_kthread && - current != fs_info->cleaner_kthread && - !test_bit(BTRFS_FS_FROZEN, &fs_info->flags)) - btrfs_run_delayed_iputs(fs_info); - return ret; scrub_continue: