mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ntfs3: set iomap uptodate bits when zeroing folios beyond i_valid
@ 2026-11-28 17:55 Drif Abdelmalek Mohamed Said
  0 siblings, 0 replies; only message in thread
From: Drif Abdelmalek Mohamed Said @ 2026-11-28 17:55 UTC (permalink / raw)
  To: Konstantin Komarov, syzbot+daa4cd155cd8696efe4f
  Cc: ntfs3, linux-kernel, Drif Abdelmalek Mohamed Said

syzbot reported this warning in ifs_free():

  ifs_is_fully_uptodate(folio, ifs) != folio_test_uptodate(folio)

When ntfs_read_folio() zeroes a folio beyond i_valid, it sets
PG_uptodate but leaves any existing iomap block bitmap unchanged.
Use iomap_folio_mark_uptodate() to keep the two in sync.

Fixes: 099ef9ab9203 ("fs/ntfs3: implement iomap-based file operations")
Reported-by: syzbot+daa4cd155cd8696efe4f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?id=f47e98cd0b0abcb731eb137d938f08861dbae58a
Signed-off-by: Drif Abdelmalek Mohamed Said <drifabdelmalekmohamedsaid@gmail.com>
---
 fs/ntfs3/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 45f894d182dd..1096534ffb98 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -849,7 +849,7 @@ static int ntfs_read_folio(struct file *file, struct folio *folio)
 
 	if (ni->i_valid <= vbo) {
 		folio_zero_range(folio, 0, folio_size(folio));
-		folio_mark_uptodate(folio);
+		iomap_folio_mark_uptodate(folio);
 		folio_unlock(folio);
 		return 0;
 	}
-- 
2.47.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-28 17:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 17:55 [PATCH] ntfs3: set iomap uptodate bits when zeroing folios beyond i_valid Drif Abdelmalek Mohamed Said

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®