Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3413228imu; Sun, 11 Nov 2018 14:29:59 -0800 (PST) X-Google-Smtp-Source: AJdET5dAmSE4PWzMBmjnxbB+W3yaq1il5YM5wky4GzyFVcQTKb6eoVbt/o3W6iFSwFsUgGJFsGbE X-Received: by 2002:a62:ca12:: with SMTP id n18-v6mr12622083pfg.191.1541975399313; Sun, 11 Nov 2018 14:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541975399; cv=none; d=google.com; s=arc-20160816; b=ax+vsd/mbzyPnte7qARDHGS+SdN8ltEX1LZC+v9/Pff7xtjXFoaFPfvdwWNkByisIt B3pVg7b4n4ThFMVnsoRyTWkYRXUHnsD/+TdAufYDW6FEvMAXRO+DAxlgN9oVst5WSuJJ f7RO/JQaJtPJaB2me6N1qGvblKlcDe53z2cECpU4+l3e9vGCQdlxd6exj3rkiPBLELK7 Cgrm6zqHbwwJkAjSVww/qiSMRw7FISTIKbDxoJpya4T2cgrr5G2dC7C8IUsodohZs02d yXn9q5EbCQklm7WVmkv+3kvd1mtfmALIGhDBNvOD4A4QgvyIX/I5JPnqxDExpSOPgw4+ /Mxw== 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=Fl7abyp2ny2dcMtVSsmvYaNrI/2Pq09DjxOvgN3GVic=; b=ApX0aqo9oBZtPc51c/y9VR7GkDxr36JwEfAjt0irm0ehVoMzZIr/b0yAu/nBrB7C3f SnePz4TU/3PFzWr/YrSeldkuQbdKUmZepwTK6WKQp/g3Ej9XjXRgrdGuUkzkRxHyq9hK 2TTpzHCnm7suLLWZe8GzlxaFHn0HY6ZL8HJsp0EdG3CW+lyd+5QRhYBD/vVmaU0cLlDP wNbu7KjLZgrERhGRWrY3fs2ipM8EQmQCT+e59e2Pyz78Uam56Z9e9nExKKLoWH5bCXgt ayTB4zryx6jicH5WgDIcpPirifX2rSOcnW4yLVJMM1hwLxpxXT1TvBaEomiPjYs/VFeE 4U4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SGEMemNL; 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 k13-v6si15484581pgp.145.2018.11.11.14.29.43; Sun, 11 Nov 2018 14:29:59 -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=SGEMemNL; 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 S1733243AbeKLISz (ORCPT + 99 others); Mon, 12 Nov 2018 03:18:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:39524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730142AbeKLISx (ORCPT ); Mon, 12 Nov 2018 03:18:53 -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 A1F7A21508; Sun, 11 Nov 2018 22:28:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975337; bh=8953rfUyG7e7cFcUprKPzcDY6/2egAp+ZOyPYwrpftA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SGEMemNLj8S/bZrLC+dCxtL1OcO5dxt0os3SYV4Hqym7S4j/HLp1tBeSSukfzAYsM ionqQRdfpVMeswensT9alpjF2shuDR9pLmCmSBQvv7r+TT3Rb2GjDoBLYJoleTzwkI Fsxnio5sgD0a2EgXm0sAlyOlX9D3LYKESai9yVH0= 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.19 353/361] btrfs: dont run delayed_iputs in commit Date: Sun, 11 Nov 2018 14:21:40 -0800 Message-Id: <20181111221701.708056344@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -2280,15 +2280,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: