Re: [PATCH] nilfs2: fix missing continue after -ENOENT in nilfs_ioctl_mark_blocks_dirty()
Junjie Cao <[email protected]> Wed, 25 Mar 2026 16:35:20 +0800
| Newsgroups | org.kernel.vger.linux-nilfs,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Ryusuke, On Sat, 21 Mar 2026 at 02:32:05 +0900, Ryusuke Konishi wrote: > Since this implementation interacts with userland GC, I will check > whether this is a simple missing 'continue' statement or if it was > intentional. Both downstream paths have asserted on (ret == -ENOENT) since the original commit 7942b919f732 -- initially as BUG_ON, later softened to WARN_ON by 1f5abe7e7dbc. If -ENOENT were meant to reach those paths, asserting on it would be contradictory. The original code appears to rely on the dead-block check (bd_blocknr != bd_oblocknr) to implicitly skip the -ENOENT case, which breaks when bd_oblocknr is also 0. This same fix also resolves a related syzbot report that hits the same root cause through the level-0 path (nilfs_mdt_get_block) rather than nilfs_bmap_mark. I applied the patch on top of current master (bbeb83d3182a) and tested it locally against that report's C reproducer in QEMU -- the warning no longer triggers. https://syzkaller.appspot.com/bug?extid=466a45fcfb0562f5b9a0 For that related report, when the patch is picked up: Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=466a45fcfb0562f5b9a0 Tested-by: Junjie Cao <[email protected]>