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" (iomap) Cc: Jens Axboe (block) Cc: Namjae Jeon (exfat, ntfs) Cc: Sungjong Seo (exfat) Cc: Yuezhang Mo (exfat) Cc: Miklos Szeredi (fuse) Cc: Andreas Gruenbacher (gfs2) Cc: Hyunchul Lee (ntfs) Cc: Konstantin Komarov (ntfs3) Cc: Carlos Maiolino (xfs) Cc: Damien Le Moal (zonefs) Cc: Naohiro Aota (zonefs) Cc: Johannes Thumshirn (zonefs) 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) --- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3