aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-06-23 04:11:15 -0400
committerAlex Elder <aelder@sgi.com>2010-07-26 14:16:34 -0400
commit9412e3181c0ef82efc3d8e88d73e583ec10c34e9 (patch)
tree10ed24cdebd9922e7cd9414941e5c59e9e5fafab /fs/xfs/quota
parente98c414f9a3134fe7efc56ef8f1d394b54bfd40e (diff)
xfs: merge iop_unpin_remove into iop_unpin
The unpin_remove item operation instances always share most of the implementation with the respective unpin implementation. So instead of keeping two different entry points add a remove flag to the unpin operation and share the code more easily. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_dquot_item.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c
index fb7054c1539d..fa2b6744937e 100644
--- a/fs/xfs/quota/xfs_dquot_item.c
+++ b/fs/xfs/quota/xfs_dquot_item.c
@@ -97,7 +97,8 @@ xfs_qm_dquot_logitem_pin(
97/* ARGSUSED */ 97/* ARGSUSED */
98STATIC void 98STATIC void
99xfs_qm_dquot_logitem_unpin( 99xfs_qm_dquot_logitem_unpin(
100 xfs_dq_logitem_t *logitem) 100 xfs_dq_logitem_t *logitem,
101 int remove)
101{ 102{
102 xfs_dquot_t *dqp = logitem->qli_dquot; 103 xfs_dquot_t *dqp = logitem->qli_dquot;
103 104
@@ -106,15 +107,6 @@ xfs_qm_dquot_logitem_unpin(
106 wake_up(&dqp->q_pinwait); 107 wake_up(&dqp->q_pinwait);
107} 108}
108 109
109/* ARGSUSED */
110STATIC void
111xfs_qm_dquot_logitem_unpin_remove(
112 xfs_dq_logitem_t *logitem,
113 xfs_trans_t *tp)
114{
115 xfs_qm_dquot_logitem_unpin(logitem);
116}
117
118/* 110/*
119 * Given the logitem, this writes the corresponding dquot entry to disk 111 * Given the logitem, this writes the corresponding dquot entry to disk
120 * asynchronously. This is called with the dquot entry securely locked; 112 * asynchronously. This is called with the dquot entry securely locked;
@@ -318,9 +310,7 @@ static struct xfs_item_ops xfs_dquot_item_ops = {
318 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*)) 310 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
319 xfs_qm_dquot_logitem_format, 311 xfs_qm_dquot_logitem_format,
320 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_pin, 312 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_pin,
321 .iop_unpin = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_unpin, 313 .iop_unpin = (void(*)(xfs_log_item_t*, int))xfs_qm_dquot_logitem_unpin,
322 .iop_unpin_remove = (void(*)(xfs_log_item_t*, xfs_trans_t*))
323 xfs_qm_dquot_logitem_unpin_remove,
324 .iop_trylock = (uint(*)(xfs_log_item_t*)) 314 .iop_trylock = (uint(*)(xfs_log_item_t*))
325 xfs_qm_dquot_logitem_trylock, 315 xfs_qm_dquot_logitem_trylock,
326 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_unlock, 316 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_unlock,
@@ -413,14 +403,7 @@ xfs_qm_qoff_logitem_pin(xfs_qoff_logitem_t *qf)
413 */ 403 */
414/*ARGSUSED*/ 404/*ARGSUSED*/
415STATIC void 405STATIC void
416xfs_qm_qoff_logitem_unpin(xfs_qoff_logitem_t *qf) 406xfs_qm_qoff_logitem_unpin(xfs_qoff_logitem_t *qf, int remove)
417{
418 return;
419}
420
421/*ARGSUSED*/
422STATIC void
423xfs_qm_qoff_logitem_unpin_remove(xfs_qoff_logitem_t *qf, xfs_trans_t *tp)
424{ 407{
425 return; 408 return;
426} 409}
@@ -524,9 +507,7 @@ static struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
524 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*)) 507 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
525 xfs_qm_qoff_logitem_format, 508 xfs_qm_qoff_logitem_format,
526 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_pin, 509 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_pin,
527 .iop_unpin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unpin, 510 .iop_unpin = (void(*)(xfs_log_item_t*, int))xfs_qm_qoff_logitem_unpin,
528 .iop_unpin_remove = (void(*)(xfs_log_item_t*,xfs_trans_t*))
529 xfs_qm_qoff_logitem_unpin_remove,
530 .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_trylock, 511 .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_trylock,
531 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unlock, 512 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unlock,
532 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) 513 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
@@ -545,9 +526,7 @@ static struct xfs_item_ops xfs_qm_qoff_logitem_ops = {
545 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*)) 526 .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
546 xfs_qm_qoff_logitem_format, 527 xfs_qm_qoff_logitem_format,
547 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_pin, 528 .iop_pin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_pin,
548 .iop_unpin = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unpin, 529 .iop_unpin = (void(*)(xfs_log_item_t*, int))xfs_qm_qoff_logitem_unpin,
549 .iop_unpin_remove = (void(*)(xfs_log_item_t*,xfs_trans_t*))
550 xfs_qm_qoff_logitem_unpin_remove,
551 .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_trylock, 530 .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_trylock,
552 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unlock, 531 .iop_unlock = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_unlock,
553 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) 532 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))