aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2017-05-26 09:28:56 -0400
committerBob Peterson <rpeterso@redhat.com>2017-06-12 15:38:53 -0400
commitd87d62b75dfd8d33dc1baf0c4d3792788b554661 (patch)
tree3f5df1442104304257b3d52356ce3f6b023a0fb8 /fs/gfs2/dir.c
parent3ef2bc099d1cce09e2844467e2ced98e1a44609d (diff)
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: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 79113219be5f..96a7487b09b6 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1444,7 +1444,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, struct dir_context *ctx,
1444 "g.offset (%u)\n", 1444 "g.offset (%u)\n",
1445 (unsigned long long)bh->b_blocknr, 1445 (unsigned long long)bh->b_blocknr,
1446 entries2, g.offset); 1446 entries2, g.offset);
1447 1447 gfs2_consist_inode(ip);
1448 error = -EIO; 1448 error = -EIO;
1449 goto out_free; 1449 goto out_free;
1450 } 1450 }
@@ -1612,6 +1612,7 @@ int gfs2_dir_read(struct inode *inode, struct dir_context *ctx,
1612 (unsigned long long)dip->i_no_addr, 1612 (unsigned long long)dip->i_no_addr,
1613 dip->i_entries, 1613 dip->i_entries,
1614 g.offset); 1614 g.offset);
1615 gfs2_consist_inode(dip);
1615 error = -EIO; 1616 error = -EIO;
1616 goto out; 1617 goto out;
1617 } 1618 }