Message ID | 20230114003409.1168311-21-mcgrof@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03DE1C54EBE for <linux-fsdevel@archiver.kernel.org>; Sat, 14 Jan 2023 00:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231435AbjANAet (ORCPT <rfc822;linux-fsdevel@archiver.kernel.org>); Fri, 13 Jan 2023 19:34:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbjANAe0 (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Fri, 13 Jan 2023 19:34:26 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C1598A239; Fri, 13 Jan 2023 16:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=YwLGE3tZfhdb3GNCHgQJPQe8jYU5q2nbVeoPp7qmp5g=; b=JlwBHquySElyuNU4THfCXRIh5n a9OdnHXVRjTMfDO90QT8nDJtygUT5rTp0U2hSW/MQ6EsLmR63UBpCKVd4am11tmMe9nUdtBnWc4QO G+TjqBEMtX6cBdjlcNGH3Z6RvaR2omqBOpw3Xwfr35dVvIWOrcgjIndfuqsHRP+uNQ9BV6Ku6Buza ROkHtNT46pYVW73v+W3Znk9gytw8Mmpg9E53him/9RHmKw65Gvovh1aNXaWPR2u38EqkWsEpjVYph RpRnGglbhBvvrv90ywKagmWtUkV6KmdvIt9sxyuy+JwMmt15JiwpJ64L5eIEab74Dt9fwA5C0uNzu WO3p9Nzg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGUUt-004twa-Pr; Sat, 14 Jan 2023 00:34:11 +0000 From: Luis Chamberlain <mcgrof@kernel.org> To: hch@infradead.org, djwong@kernel.org, song@kernel.org, rafael@kernel.org, gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, jack@suse.cz, bvanassche@acm.org, ebiederm@xmission.com Cc: mchehab@kernel.org, keescook@chromium.org, p.raghav@samsung.com, linux-fsdevel@vger.kernel.org, kernel@tuxforce.de, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Luis Chamberlain <mcgrof@kernel.org> Subject: [RFC v3 20/24] coredump: drop freezer usage Date: Fri, 13 Jan 2023 16:34:05 -0800 Message-Id: <20230114003409.1168311-21-mcgrof@kernel.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230114003409.1168311-1-mcgrof@kernel.org> References: <20230114003409.1168311-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain <mcgrof@infradead.org> Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org |
Series |
vfs: provide automatic kernel freeze / resume
|
expand
|
diff --git a/fs/coredump.c b/fs/coredump.c index f27d734f3102..3a0a5c946bf8 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -459,7 +459,7 @@ static bool dump_interrupted(void) * but then we need to teach dump_write() to restart and clear * TIF_SIGPENDING. */ - return fatal_signal_pending(current) || freezing(current); + return fatal_signal_pending(current); } static void wait_for_dump_helpers(struct file *file)
The kernel power management now supports allowing the VFS to handle filesystem freezing freezes and thawing. Take advantage of that and remove the kthread freezing. This is needed so that we properly really stop IO in flight without races after userspace has been frozen. Without this we rely on kthread freezing and its semantics are loose and error prone. The filesystem therefore is in charge of properly dealing with quiescing of the filesystem through its callbacks if it thinks it knows better than how the VFS handles it. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- fs/coredump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)