xfs: reduce ilock hold times in xfs_setattr_size
authorChristoph Hellwig <hch@infradead.org>
Tue, 27 Mar 2012 14:34:48 +0000 (10:34 -0400)
committerBen Myers <bpm@sgi.com>
Mon, 14 May 2012 21:20:18 +0000 (16:20 -0500)
commitf38996f5768713fb60e1d2de66c097367d54bb6a
tree42135e66d1a3e90aede209d491dec9304e36d703
parent467f78992a0743e0e71729e4faa20b67b0f25289
xfs: reduce ilock hold times in xfs_setattr_size

We do not need the ilock for most checks done in the beginning of
xfs_setattr_size.  Replace the long critical section before starting the
transaction with a smaller one around xfs_zero_eof and an optional one
inside xfs_qm_dqattach that isn't entered unless using quotas.  While
this isn't a big optimization for xfs_setattr_size itself it will allow
pushing the ilock into xfs_zero_eof itself later.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_iops.c