]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: avoid taking the ilock unnessecarily in xfs_qm_dqattach
authorChristoph Hellwig <hch@infradead.org>
Tue, 27 Mar 2012 14:34:46 +0000 (10:34 -0400)
committerBen Myers <bpm@sgi.com>
Thu, 19 Apr 2012 22:08:26 +0000 (17:08 -0500)
commitf4d74bb6c36dfcf3a1fd9805add8f982418e04d5
treedf2c46061cc44055771475056962bc4c45a7b758
parent576f1a5f2a7e2f9bcf1ffe0140f27e7ee49a4069
xfs: avoid taking the ilock unnessecarily in xfs_qm_dqattach

Check if we actually need to attach a dquot before taking the ilock in
xfs_qm_dqattach.  This avoid superflous lock roundtrips for the common cases
of quota support compiled in but not activated on a filesystem and an
inode that already has the dquots attached.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_qm.c