From: Darrick J. Wong Date: Thu, 22 Aug 2024 23:59:17 +0000 (-0700) Subject: xfs: fix folio dirtying for XFILE_ALLOC callers X-Git-Tag: v6.11-rc6~8^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5335affcff91b53cfc45694171f911cb23257c8b;p=thirdparty%2Fkernel%2Flinux.git xfs: fix folio dirtying for XFILE_ALLOC callers willy pointed out that folio_mark_dirty is the correct function to use to mark an xfile folio dirty because it calls out to the mapping's aops to mark it dirty. For tmpfs this likely doesn't matter much since it currently uses nop_dirty_folio, but let's use the abstractions properly. Reported-by: willy@infradead.org Fixes: 6907e3c00a40 ("xfs: add file_{get,put}_folio") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c index d848222f802ba..9b5d98fe1f8ab 100644 --- a/fs/xfs/scrub/xfile.c +++ b/fs/xfs/scrub/xfile.c @@ -293,7 +293,7 @@ xfile_get_folio( * (potentially last) reference in xfile_put_folio. */ if (flags & XFILE_ALLOC) - folio_set_dirty(folio); + folio_mark_dirty(folio); return folio; }