From: Bob Peterson Date: Fri, 26 May 2017 13:28:56 +0000 (-0500) Subject: GFS2: Withdraw when directory entry inconsistencies are detected X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d87d62b75dfd8d33dc1baf0c4d3792788b554661;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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, "g.offset (%u)\n", (unsigned long long)bh->b_blocknr, entries2, g.offset); - + gfs2_consist_inode(ip); error = -EIO; goto out_free; } @@ -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; }