[lvc-project] [PATCH] ocfs2: do not use make_bad_inode() in ocfs2_read_inode_block_full()
Joseph Qi
joseph.qi at linux.alibaba.com
Thu Jul 9 08:36:28 MSK 2026
On 7/8/26 3:02 PM, Dmitry Antipov wrote:
> 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
s/ls/is?
> 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>
Seems missing 'Fixes' tag here.
Thanks,
Joseph
> ---
> 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;
More information about the lvc-project
mailing list