* [PATCH] xfs: fix folio dirtying for XFILE_ALLOC callers
@ 2024-08-12 22:39 Darrick J. Wong
2024-08-13 5:46 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2024-08-12 22:39 UTC (permalink / raw)
To: Chandan Babu R; +Cc: xfs, Matthew Wilcox
From: Darrick J. Wong <djwong@kernel.org>
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: willy@infradead.org
Fixes: 6907e3c00a40 ("xfs: add file_{get,put}_folio")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
fs/xfs/scrub/xfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c
index d848222f802b..9b5d98fe1f8a 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs: fix folio dirtying for XFILE_ALLOC callers
2024-08-12 22:39 [PATCH] xfs: fix folio dirtying for XFILE_ALLOC callers Darrick J. Wong
@ 2024-08-13 5:46 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2024-08-13 5:46 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Chandan Babu R, xfs, Matthew Wilcox
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-13 5:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 22:39 [PATCH] xfs: fix folio dirtying for XFILE_ALLOC callers Darrick J. Wong
2024-08-13 5:46 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox