[PATCH] ntfs3: set iomap uptodate bits when zeroing folios beyond i_valid
From: Drif Abdelmalek Mohamed Said
Date: Sat Nov 28 2026 - 12:55:30 EST
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@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://syzkaller.appspot.com/bug?id=f47e98cd0b0abcb731eb137d938f08861dbae58a
Signed-off-by: Drif Abdelmalek Mohamed Said <drifabdelmalekmohamedsaid@xxxxxxxxx>
---
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