[lvc-project] [PATCH] ocfs2: do not use make_bad_inode() in ocfs2_read_inode_block_full()
Dmitry Antipov
dmantipov at yandex.ru
Wed Jul 8 10:02:54 MSK 2026
This reverts commit 58b6fcd2ab34 ("ocfs2: mark inode bad upon
validation failure during read").
Since 'make_bad_inode()' resets inode type to S_IFREG, doing this
for directory inode during active VFS lookup ls likely to confuse
the latter, including VFS_BUG_ON_INODE() triggered in this case.
Reported-by: syzbot+d222f4b7129379c3d5bc at syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d222f4b7129379c3d5bc
Suggested-by: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
---
Suggested by Al at https://syzkaller.appspot.com/text?tag=Patch&x=10c51a1a580000.
I've also verified https://syzkaller.appspot.com/bug?extid=b93b65ee321c97861072
and this issue is no longer triggered when 'make_bad_inode()' is dropped.
---
fs/ocfs2/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 662dbc845b8b..b5d109cc9edc 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1948,8 +1948,6 @@ int ocfs2_read_inode_block_full(struct inode *inode, struct buffer_head **bh,
rc = ocfs2_read_blocks(INODE_CACHE(inode), OCFS2_I(inode)->ip_blkno,
1, &tmp, flags, ocfs2_validate_inode_block);
- if (rc < 0)
- make_bad_inode(inode);
/* If ocfs2_read_blocks() got us a new bh, pass it up. */
if (!rc && !*bh)
*bh = tmp;
--
2.55.0
More information about the lvc-project
mailing list