summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-12-06 21:58:19 +0000
committerBen Myers <bpm@sgi.com>2011-12-14 21:15:42 -0600
commitbf72de3194e73fa210a904b0bd951135286bb385 (patch)
tree408ead179da91befd82e0cc23ed66830ead2fa59 /fs/xfs/xfs_qm.c
parent92678554abfc2a2f2727ad168da87d8d434ac904 (diff)
downloadop-kernel-dev-bf72de3194e73fa210a904b0bd951135286bb385.zip
op-kernel-dev-bf72de3194e73fa210a904b0bd951135286bb385.tar.gz
xfs: nest qm_dqfrlist_lock inside the dquot qlock
Allow xfs_qm_dqput to work without trylock loops by nesting the freelist lock inside the dquot qlock. In turn that requires trylocks in the reclaim path instead, but given it's a classic tradeoff between fast and slow path, and we follow the model of the inode and dentry caches. Document our new lock order now that it has settled. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index f418731..22360bb 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1668,7 +1668,9 @@ xfs_qm_dqreclaim_one(void)
restart:
list_for_each_entry(dqp, &xfs_Gqm->qm_dqfrlist, q_freelist) {
struct xfs_mount *mp = dqp->q_mount;
- xfs_dqlock(dqp);
+
+ if (!xfs_dqlock_nowait(dqp))
+ continue;
/*
* This dquot has already been grabbed by dqlookup.
OpenPOWER on IntegriCloud