[PATCH 1/5 v3] xfs: always take the iolock around xfs_setattr_size

Dave Chinner david at fromorbit.com
Mon Oct 14 15:28:41 CDT 2013


On Mon, Oct 14, 2013 at 07:09:35AM -0700, Christoph Hellwig wrote:
> There is no reason to conditionally take the iolock inside xfs_setattr_size
> when we can let the caller handle it unconditionally, which just incrases
> the lock hold time for the case where it was previously taken internally
> by a few instructions.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
...
> @@ -750,12 +745,11 @@ xfs_setattr_size(
>  	 */
>  	if (newsize == 0 && oldsize == 0 && ip->i_d.di_nextents == 0) {
>  		if (!(mask & (ATTR_CTIME|ATTR_MTIME)))
> -			goto out_unlock;
> +			return 0;

That looks better :)

Reviewed-by: Dave Chinner <dchinner at redhat.com>
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list