xfs: fix folio dirtying for XFILE_ALLOC callers
PATCH 1/1 xfs: fix folio dirtying for XFILE_ALLOC callers
From: Darrick J. Wong <[email protected]>
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 and not leave logic bombs.
Reported-by [email protected]
Fixes 6907e3c00a40 ("xfs: add file_{get,put}_folio")
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/xfs/scrub/xfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/scrub/xfile.c +1 -1
@@ -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; }
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>