aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_qm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-02-09 02:38:39 -0500
committerChristoph Hellwig <hch@brick.lst.de>2009-02-09 02:38:39 -0500
commite249458220c9799fe94573abd341d29c83579671 (patch)
tree109a54c3609a44d1a7a55e062531ac55a9a3ead2 /fs/xfs/quota/xfs_qm.c
parent517b5e8c8516a25a0df3b530fd183eb493a96698 (diff)
xfs: remove XFS_QM_LOCK/XFS_QM_UNLOCK/XFS_QM_HOLD/XFS_QM_RELE
Remove these macros which only obsfucated the code in rather nast ways. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/quota/xfs_qm.c')
-rw-r--r--fs/xfs/quota/xfs_qm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index fd0b383d72a5..246790ad9589 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -219,7 +219,7 @@ xfs_qm_hold_quotafs_ref(
219 * the structure could disappear between the entry to this routine and 219 * the structure could disappear between the entry to this routine and
220 * a HOLD operation if not locked. 220 * a HOLD operation if not locked.
221 */ 221 */
222 XFS_QM_LOCK(xfs_Gqm); 222 mutex_lock(&xfs_Gqm_lock);
223 223
224 if (xfs_Gqm == NULL) 224 if (xfs_Gqm == NULL)
225 xfs_Gqm = xfs_Gqm_init(); 225 xfs_Gqm = xfs_Gqm_init();
@@ -228,8 +228,8 @@ xfs_qm_hold_quotafs_ref(
228 * debugging and statistical purposes, but ... 228 * debugging and statistical purposes, but ...
229 * Just take a reference and get out. 229 * Just take a reference and get out.
230 */ 230 */
231 XFS_QM_HOLD(xfs_Gqm); 231 xfs_Gqm->qm_nrefs++;
232 XFS_QM_UNLOCK(xfs_Gqm); 232 mutex_unlock(&xfs_Gqm_lock);
233 233
234 return 0; 234 return 0;
235} 235}
@@ -277,13 +277,12 @@ xfs_qm_rele_quotafs_ref(
277 * Destroy the entire XQM. If somebody mounts with quotaon, this'll 277 * Destroy the entire XQM. If somebody mounts with quotaon, this'll
278 * be restarted. 278 * be restarted.
279 */ 279 */
280 XFS_QM_LOCK(xfs_Gqm); 280 mutex_lock(&xfs_Gqm_lock);
281 XFS_QM_RELE(xfs_Gqm); 281 if (--xfs_Gqm->qm_nrefs == 0) {
282 if (xfs_Gqm->qm_nrefs == 0) {
283 xfs_qm_destroy(xfs_Gqm); 282 xfs_qm_destroy(xfs_Gqm);
284 xfs_Gqm = NULL; 283 xfs_Gqm = NULL;
285 } 284 }
286 XFS_QM_UNLOCK(xfs_Gqm); 285 mutex_unlock(&xfs_Gqm_lock);
287} 286}
288 287
289/* 288/*