From: Matthew Wilcox (Oracle) Date: Wed, 24 Jun 2026 17:42:26 +0000 (+0100) Subject: iomap: Remove FGP_NOFS from iomap_get_folio() X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e08fd6119126689a50003b3a07ed139461ccdfb5;p=thirdparty%2Flinux.git iomap: Remove FGP_NOFS from iomap_get_folio() FGP_NOFS is legacy; filesystems should be using memalloc_nofs_save/restore instead. We have it here in iomap because it was buried in grab_cache_page_write_begin() and we didn't want to change this behaviour as part of the folio transition. I have tested this with XFS and see no issues. Other filesystems (cc'd) may need to make adjustments. Please test with lockdep enabled. Cc: Darrick J. Wong Cc: Jens Axboe Cc: Namjae Jeon Cc: Sungjong Seo Cc: Yuezhang Mo Cc: Miklos Szeredi Cc: Andreas Gruenbacher Cc: Hyunchul Lee Cc: Konstantin Komarov Cc: Carlos Maiolino Cc: Damien Le Moal Cc: Naohiro Aota Cc: Johannes Thumshirn Cc: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-block@vger.kernel.org Cc: fuse-devel@lists.linux.dev Cc: gfs2@lists.linux.dev Cc: ntfs3@lists.linux.dev Signed-off-by: Matthew Wilcox (Oracle) Link: https://patch.msgid.link/20260624174228.2015893-1-willy@infradead.org Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 8d4806dc46d4..27bc2455a98d 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(iomap_is_partially_uptodate); */ struct folio *iomap_get_folio(struct iomap_iter *iter, loff_t pos, size_t len) { - fgf_t fgp = FGP_WRITEBEGIN | FGP_NOFS; + fgf_t fgp = FGP_WRITEBEGIN; if (iter->flags & IOMAP_NOWAIT) fgp |= FGP_NOWAIT;