summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-01-11 18:52:10 +0000
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-08-17 15:35:03 -0400
commitc165148d4e8e88674a8fa548ec1a33712ad3f0e3 (patch)
tree3c477564572572fdd6ade99a998ac4554698a31d /fs
parent5ddd060caa74495dfadac5c94f5e47ff19063ea7 (diff)
xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()
commit 9b025eb3a89e041bab6698e3858706be2385d692 upstream. Commit b52a360b forgot to call xfs_iunlock() when it detected corrupted symplink and bailed out. Fix it by jumping to 'out' instead of doing return. CC: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Alex Elder <elder@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_vnodeops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index c682c5d8594a..a5a58560ae3b 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -573,7 +573,8 @@ xfs_readlink(
"%s: inode (%llu) bad symlink length (%lld)", __func__,
(unsigned long long) ip->i_ino, (long long) pathlen);
ASSERT(0);
- return XFS_ERROR(EFSCORRUPTED);
+ error = XFS_ERROR(EFSCORRUPTED);
+ goto out;
}