提交 d87d62b7 编写于 作者: B Bob Peterson

GFS2: Withdraw when directory entry inconsistencies are detected

This patch prints an inode consistency error and withdraws the file
system when directory entry counts are mismatched.
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
上级 3ef2bc09
...@@ -1444,7 +1444,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, struct dir_context *ctx, ...@@ -1444,7 +1444,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, struct dir_context *ctx,
"g.offset (%u)\n", "g.offset (%u)\n",
(unsigned long long)bh->b_blocknr, (unsigned long long)bh->b_blocknr,
entries2, g.offset); entries2, g.offset);
gfs2_consist_inode(ip);
error = -EIO; error = -EIO;
goto out_free; goto out_free;
} }
...@@ -1612,6 +1612,7 @@ int gfs2_dir_read(struct inode *inode, struct dir_context *ctx, ...@@ -1612,6 +1612,7 @@ int gfs2_dir_read(struct inode *inode, struct dir_context *ctx,
(unsigned long long)dip->i_no_addr, (unsigned long long)dip->i_no_addr,
dip->i_entries, dip->i_entries,
g.offset); g.offset);
gfs2_consist_inode(dip);
error = -EIO; error = -EIO;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册