[PATCH 4/5] xfs: push the ilock into xfs_zero_eof
Dave Chinner
david at fromorbit.com
Tue Mar 27 01:11:29 CDT 2012
On Tue, Mar 27, 2012 at 01:48:27AM -0400, Christoph Hellwig wrote:
> On Tue, Mar 27, 2012 at 12:15:40PM +1100, Dave Chinner wrote:
> > > + xfs_ilock(ip, XFS_ILOCK_EXCL);
> > > error = xfs_bmapi_read(ip, last_fsb, 1, &imap, &nimaps, 0);
> > > + xfs_iunlock(ip, XFS_ILOCK_EXCL);
> >
> > Does that even need to be an exclusive lock? a shared lock is all
> > that is needed to do a lookup, and this is just a lookup...
>
> It has to be a xfs_ilock_map_shared - but given that we hold the iolock
> exclusive anyway I didn't bother to optimize this further.
Ok, makes sense.
Reviewed-by: Dave Chinner <dchinner at redhat.com>
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list