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

Dave Chinner
2013-10-14T20:28:44Z

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@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@redhat.com>
--
Dave Chinner
david@fromorbit.com