From: Adarsh Das <adarshdas950@gmail.com>
To: almaz.alexandrovich@paragon-software.com
Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
syzbot+3db654d91b471c4d7a7d@syzkaller.appspotmail.com,
Adarsh Das <adarshdas950@gmail.com>
Subject: [PATCH] ntfs3: sync uptodate with iomap folio state in read_folio
Date: Mon, 21 Sep 2026 22:54:51 +0530 [thread overview]
Message-ID: <20260921172451.121701-1-adarshdas950@gmail.com> (raw)
In-Reply-To: <6aab8055.71f81b7d.278072.0016.GAE@google.com>
ntfs3 registers iomap page-cache helpers for its regular files. When
the filesystem block size is smaller than the folio size, folios are
backed by iomap_folio_state with a per-block uptodate bitmap in addition
to PG_uptodate.
The i_valid <= vbo early exit in ntfs_read_folio() zeroes folios past
valid data and marks them uptodate with folio_mark_uptodate(), updating
only the folio flag. That leaves the iomap bitmap out of sync and
ifs_free() WARNs during evict when the folio is torn down.
Use iomap_folio_mark_uptodate() to update both the folio uptodate state
and the iomap uptodate bitmap.
Reported-by: syzbot+3db654d91b471c4d7a7d@syzkaller.appspotmail.com
Link: https://lore.kernel.org/all/6aab8055.71f81b7d.278072.0016.GAE@google.com/
Tested-by: syzbot+3db654d91b471c4d7a7d@syzkaller.appspotmail.com
Assisted-by: LLM
Signed-off-by: Adarsh Das <adarshdas950@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 56b4f6469a28..a9b4e288ca20 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -842,7 +842,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.55.0
next prev parent reply other threads:[~2026-09-21 17:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 5:53 [syzbot] [ntfs3?] WARNING in ntfs_evict_inode syzbot
2026-09-20 9:11 ` Forwarded: " syzbot
2026-09-20 9:28 ` syzbot
2026-09-20 10:34 ` syzbot
2026-09-20 11:01 ` syzbot
2026-09-20 12:52 ` syzbot
2026-09-21 14:04 ` syzbot
2026-09-21 14:28 ` Forwarded: [PATCH] debug: log uptodate states for iomap bug syzbot
2026-09-21 17:24 ` Adarsh Das [this message]
2026-09-21 18:03 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921172451.121701-1-adarshdas950@gmail.com \
--to=adarshdas950@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
--cc=syzbot+3db654d91b471c4d7a7d@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®