]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: fix folio dirtying for XFILE_ALLOC callers
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Aug 2024 23:59:17 +0000 (16:59 -0700)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 26 Aug 2024 04:21:27 +0000 (09:51 +0530)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/scrub/xfile.c

index d848222f802baa020a00757bce9fc2cbf26ba625..9b5d98fe1f8ab3125bce69622d8e63edd887d3fa 100644 (file)
@@ -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;
 }