Skip to content

Commit

Permalink
GFS2: Withdraw when directory entry inconsistencies are detected
Browse files Browse the repository at this point in the history
This patch prints an inode consistency error and withdraws the file
system when directory entry counts are mismatched.

Signed-off-by: Bob Peterson <[email protected]>
  • Loading branch information
AstralBob committed Jun 12, 2017
1 parent 3ef2bc0 commit d87d62b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, struct dir_context *ctx,
"g.offset (%u)\n",
(unsigned long long)bh->b_blocknr,
entries2, g.offset);
gfs2_consist_inode(ip);
error = -EIO;
goto out_free;
}
Expand Down Expand Up @@ -1612,6 +1612,7 @@ int gfs2_dir_read(struct inode *inode, struct dir_context *ctx,
(unsigned long long)dip->i_no_addr,
dip->i_entries,
g.offset);
gfs2_consist_inode(dip);
error = -EIO;
goto out;
}
Expand Down

0 comments on commit d87d62b

Please sign in to comment.