xfs: add a xfs_dqhold helper

Factor the common pattern of:

	xfs_dqlock(dqp);
	XFS_DQHOLD(dqp);
	xfs_dqunlock(dqp);

into a new helper, and remove XFS_DQHOLD now that only one other caller
is left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
Christoph Hellwig
2011-12-06 21:58:22 +00:00
committed by Ben Myers
parent ab680bb739
commit 78e55892d6
3 changed files with 21 additions and 39 deletions

View File

@@ -733,7 +733,7 @@ xfs_qm_dqlookup(
return -1;
}
XFS_DQHOLD(dqp);
dqp->q_nrefs++;
/*
* move the dquot to the front of the hashchain