aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_fork.c
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-01-08 10:51:06 -0800
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2018-01-08 10:54:46 -0800
commitdc042c2d8ff629dd411e9a60bce9c379e2f8aaf8 (patch)
tree67c40e032fb069380e08806644405e9c8ce3761d /fs/xfs/libxfs/xfs_inode_fork.c
parentxfs: create structure verifier function for short form symlinks (diff)
downloadlinux-dc042c2d8ff629dd411e9a60bce9c379e2f8aaf8.tar.gz
linux-dc042c2d8ff629dd411e9a60bce9c379e2f8aaf8.tar.bz2
linux-dc042c2d8ff629dd411e9a60bce9c379e2f8aaf8.zip
xfs: refactor short form directory structure verifier function
Change the short form directory structure verifier function to return the instruction pointer of a failing check or NULL if everything's ok. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
-rw-r--r--fs/xfs/libxfs/xfs_inode_fork.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
index fd88cbe8c264..a92395a901d4 100644
--- a/fs/xfs/libxfs/xfs_inode_fork.c
+++ b/fs/xfs/libxfs/xfs_inode_fork.c
@@ -99,10 +99,9 @@ xfs_iformat_fork(
/* Check inline dir contents. */
if (S_ISDIR(inode->i_mode) && dip->di_format == XFS_DINODE_FMT_LOCAL) {
- error = xfs_dir2_sf_verify(ip);
- if (error) {
+ if (xfs_dir2_sf_verify(ip)) {
xfs_idestroy_fork(ip, XFS_DATA_FORK);
- return error;
+ return -EFSCORRUPTED;
}
}