| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/5 v3] xfs: always take the iolock around xfs_setattr_size |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Tue, 15 Oct 2013 07:28:41 +1100 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20131014140935.GA32035@xxxxxxxxxxxxx> |
| References: | <20131012075503.370510641@xxxxxxxxxxxxxxxxxxxxxx> <20131012075639.940898263@xxxxxxxxxxxxxxxxxxxxxx> <20131014140935.GA32035@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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@xxxxxx>
...
> @@ -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@xxxxxxxxxx>
--
Dave Chinner
david@xxxxxxxxxxxxx
|
| Previous by Date: | Re: [PATCH] xfs: prevent deadlock trying to cover an active log, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH] xfs: prevent deadlock trying to cover an active log, Ben Myers |
| Previous by Thread: | [PATCH 1/5 v3] xfs: always take the iolock around xfs_setattr_size, Christoph Hellwig |
| Next by Thread: | [PATCH 5/5] xfs: fold xfs_change_file_space into xfs_ioc_space, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |