From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C24D33F88BE for ; Tue, 7 Jul 2026 11:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783424387; cv=none; b=MRmXpkiDG4i4Q1NwSGfwe+q8k3VoV+qHIT+eFEOheY+nTmaxwfmdxSnlJlz8CpF+psTayrttvrwyEpOzcYmlgGe0kQopj2IkQRepXmwJg8g/6bPkBmIy2IuUfeIJLXpBfV23So0Dz/I9f9HLRYbrMTqqFX6CvI9A5FXICUEB3co= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783424387; c=relaxed/simple; bh=d9lIMK4DCPIaTziJ5g6F0Uq4NHVNNWQpjRm4kbGge5c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VkXjjWft05mDwnmYxFIc/MyoGdOPDiCWpIR00MVAXyT2lojJLrdj2Udw9v7N0AkhsMdNGZeRMTy40yDikFC9Vvd/bOr722bhkh2ZTt8pBD1AUjg8si4UaD5lOTiuLa42VaoK3xFyHfx08vb+ko+qnZxxVvhwUkAWXR4LHNKFGZM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QsmyTKha; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QsmyTKha" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5ADAD1F00A3A; Tue, 7 Jul 2026 11:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783424386; bh=xpG7zF2XtrUQxf5E81O8+yc7rNhR3bN8KjXT1FV1NCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QsmyTKhakPVGBz/7sYQ1hi2DjLP8CNqTRHJuZwUuM5puMBES8umhGzyg4/Y6YOqnw 0pmJARfb0DT0Zuf42iRp5CokIqSjhE4cttQJsdtb3EXgF/rhAcyw+vK+1f/ouyio+A Qaowud/6PwnxzBpOhKwu2D3ey6wCUvFVQSOIBfLSfKoUCOXkgJt/S2fC1/0iUnAxdZ F//yMiIEn1gVfqh6ZNpnEHCztGCXaYECaPfZ2rY6KRC0KWdUyo3QGRZ69c+OBPc2wh sr9Ssf69dQh2l0Pr8/t2druUSbObRjMt62XZWlc+NgFaDj3Nr6thAVp1KdvKp5CMmd 6nqihuTnl5Xtw== From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu , Matthew Wilcox Subject: [PATCH v2 2/2] f2fs: drop FGP_NOFS in f2fs_write_begin() Date: Tue, 7 Jul 2026 19:39:34 +0800 Message-ID: <20260707113934.3003158-2-chao@kernel.org> X-Mailer: git-send-email 2.55.0.rc2.803.g1fd1e6609c-goog In-Reply-To: <20260707113934.3003158-1-chao@kernel.org> References: <20260707113934.3003158-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch proposes to drop FGP_NOFS from f2fs_filemap_get_folio() in f2fs_write_begin(), I don't see there is potential deadlock issue when __filemap_get_folio() calling into filesystem reclaim interfaces, e.g. .writepages, evict_inode, shrinker. Cc: Matthew Wilcox Signed-off-by: Chao Yu --- v2: - just drop FGP_NOFS rather than use memalloc_nofs_* helpers. fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ac1cf4de3d62..be4c1d4ed6b2 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3994,7 +3994,7 @@ static int f2fs_write_begin(const struct kiocb *iocb, * Will wait that below with our IO control. */ folio = f2fs_filemap_get_folio(mapping, index, - FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_NOFS, + FGP_LOCK | FGP_WRITE | FGP_CREAT, mapping_gfp_mask(mapping)); if (IS_ERR(folio)) { err = PTR_ERR(folio); -- 2.49.0