Skip to contentSkip to conversation

ntfs3: set iomap uptodate bits when zeroing folios beyond i_valid

PATCH New Drif Abdelmalek Mohamed Said 1 participant 1 message Nov 28 NTFS3 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ntfs3: set iomap uptodate bits when zeroing folios beyond i_valid

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 [email protected]
---
 fs/ntfs3/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/inode.c +1 -1
index 45f894d182dd..1096534ffb98 100644
@@ -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;
 	}
Signature · 1 line
2.47.3