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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 11, 2012 at 07:52:10PM +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.
> 
> CC: stable@xxxxxxxxxx
> CC: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
> Signed-off-by: Jan Kara <jack@xxxxxxx>
> ---
>  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;
>  	}

Heh, you beat me to it. I was testing an identical patch yesterday
for this problem which was tripped over by RH QA....

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux