xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()
authorJan Kara <jack@suse.cz>
Wed, 11 Jan 2012 18:52:10 +0000 (18:52 +0000)
committerBen Myers <bpm@sgi.com>
Wed, 25 Jan 2012 17:01:31 +0000 (11:01 -0600)
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: stable@kernel.org
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>
fs/xfs/xfs_vnodeops.c

index 0cf52da9d2468a547a614f55cf0191a396f82574..ebdb88840a47817b5704df2aaa0fefb8b11fd96e 100644 (file)
@@ -131,7 +131,8 @@ xfs_readlink(
                         __func__, (unsigned long long) ip->i_ino,
                         (long long) pathlen);
                ASSERT(0);
-               return XFS_ERROR(EFSCORRUPTED);
+               error = XFS_ERROR(EFSCORRUPTED);
+               goto out;
        }