[PATCH] xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()

Alex Elder elder at dreamhost.com
Wed Jan 11 14:30:23 CST 2012


On Wed, 2012-01-11 at 19:52 +0100, Jan Kara wrote:
> 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.

Whoops.  Sorry I didn't catch that.  Your fix looks good.

Reviewed-by: Alex Elder <elder at kernel.org>

> CC: stable at kernel.org
> CC: Carlos Maiolino <cmaiolino at redhat.com>
> Signed-off-by: Jan Kara <jack at suse.cz>
> ---
>  fs/xfs/xfs_vnodeops.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
> index f2fea86..6156cd6 100644
> --- a/fs/xfs/xfs_vnodeops.c
> +++ b/fs/xfs/xfs_vnodeops.c
> @@ -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;
>  	}
>  
> 






More information about the xfs mailing list