diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-06 16:58:14 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2011-12-12 18:28:20 -0500 |
commit | 800b484ec0262946262ad20561a8081fd31f4a6f (patch) | |
tree | 41bc447ef77f21546e03d975017c11cb3d1a1a4d /fs/xfs/xfs_dquot.c | |
parent | a7ef9bd79f488c643edfda7dedcbdb0a1b8e7552 (diff) |
xfs: cleanup dquot locking helpers
Mark the trivial lock wrappers as inline, and make the naming consistent
for all of them.
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_dquot.c')
-rw-r--r-- | fs/xfs/xfs_dquot.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 9aef727a48b2..13eef1f92d20 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -1257,40 +1257,17 @@ xfs_qm_dqflush( | |||
1257 | 1257 | ||
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | int | ||
1261 | xfs_qm_dqlock_nowait( | ||
1262 | xfs_dquot_t *dqp) | ||
1263 | { | ||
1264 | return mutex_trylock(&dqp->q_qlock); | ||
1265 | } | ||
1266 | |||
1267 | void | ||
1268 | xfs_dqlock( | ||
1269 | xfs_dquot_t *dqp) | ||
1270 | { | ||
1271 | mutex_lock(&dqp->q_qlock); | ||
1272 | } | ||
1273 | |||
1274 | void | 1260 | void |
1275 | xfs_dqunlock( | 1261 | xfs_dqunlock( |
1276 | xfs_dquot_t *dqp) | 1262 | xfs_dquot_t *dqp) |
1277 | { | 1263 | { |
1278 | mutex_unlock(&(dqp->q_qlock)); | 1264 | xfs_dqunlock_nonotify(dqp); |
1279 | if (dqp->q_logitem.qli_dquot == dqp) { | 1265 | if (dqp->q_logitem.qli_dquot == dqp) { |
1280 | /* Once was dqp->q_mount, but might just have been cleared */ | ||
1281 | xfs_trans_unlocked_item(dqp->q_logitem.qli_item.li_ailp, | 1266 | xfs_trans_unlocked_item(dqp->q_logitem.qli_item.li_ailp, |
1282 | (xfs_log_item_t*)&(dqp->q_logitem)); | 1267 | &dqp->q_logitem.qli_item); |
1283 | } | 1268 | } |
1284 | } | 1269 | } |
1285 | 1270 | ||
1286 | |||
1287 | void | ||
1288 | xfs_dqunlock_nonotify( | ||
1289 | xfs_dquot_t *dqp) | ||
1290 | { | ||
1291 | mutex_unlock(&(dqp->q_qlock)); | ||
1292 | } | ||
1293 | |||
1294 | /* | 1271 | /* |
1295 | * Lock two xfs_dquot structures. | 1272 | * Lock two xfs_dquot structures. |
1296 | * | 1273 | * |
@@ -1370,7 +1347,7 @@ xfs_qm_dqpurge( | |||
1370 | * Block on the flush lock after nudging dquot buffer, | 1347 | * Block on the flush lock after nudging dquot buffer, |
1371 | * if it is incore. | 1348 | * if it is incore. |
1372 | */ | 1349 | */ |
1373 | xfs_qm_dqflock_pushbuf_wait(dqp); | 1350 | xfs_dqflock_pushbuf_wait(dqp); |
1374 | } | 1351 | } |
1375 | 1352 | ||
1376 | /* | 1353 | /* |
@@ -1427,7 +1404,7 @@ xfs_qm_dqpurge( | |||
1427 | * wait on the flush lock. | 1404 | * wait on the flush lock. |
1428 | */ | 1405 | */ |
1429 | void | 1406 | void |
1430 | xfs_qm_dqflock_pushbuf_wait( | 1407 | xfs_dqflock_pushbuf_wait( |
1431 | xfs_dquot_t *dqp) | 1408 | xfs_dquot_t *dqp) |
1432 | { | 1409 | { |
1433 | xfs_mount_t *mp = dqp->q_mount; | 1410 | xfs_mount_t *mp = dqp->q_mount; |