diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-06-23 04:11:15 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 14:16:34 -0400 |
commit | 9412e3181c0ef82efc3d8e88d73e583ec10c34e9 (patch) | |
tree | 10ed24cdebd9922e7cd9414941e5c59e9e5fafab /fs/xfs/xfs_inode_item.c | |
parent | e98c414f9a3134fe7efc56ef8f1d394b54bfd40e (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/xfs_inode_item.c')
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 4b97d7754b83..a01990dbb945 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -544,10 +544,10 @@ xfs_inode_item_pin( | |||
544 | * | 544 | * |
545 | * Also wake up anyone in xfs_iunpin_wait() if the count goes to 0. | 545 | * Also wake up anyone in xfs_iunpin_wait() if the count goes to 0. |
546 | */ | 546 | */ |
547 | /* ARGSUSED */ | ||
548 | STATIC void | 547 | STATIC void |
549 | xfs_inode_item_unpin( | 548 | xfs_inode_item_unpin( |
550 | xfs_inode_log_item_t *iip) | 549 | xfs_inode_log_item_t *iip, |
550 | int remove) | ||
551 | { | 551 | { |
552 | struct xfs_inode *ip = iip->ili_inode; | 552 | struct xfs_inode *ip = iip->ili_inode; |
553 | 553 | ||
@@ -557,15 +557,6 @@ xfs_inode_item_unpin( | |||
557 | wake_up(&ip->i_ipin_wait); | 557 | wake_up(&ip->i_ipin_wait); |
558 | } | 558 | } |
559 | 559 | ||
560 | /* ARGSUSED */ | ||
561 | STATIC void | ||
562 | xfs_inode_item_unpin_remove( | ||
563 | xfs_inode_log_item_t *iip, | ||
564 | xfs_trans_t *tp) | ||
565 | { | ||
566 | xfs_inode_item_unpin(iip); | ||
567 | } | ||
568 | |||
569 | /* | 560 | /* |
570 | * This is called to attempt to lock the inode associated with this | 561 | * This is called to attempt to lock the inode associated with this |
571 | * inode log item, in preparation for the push routine which does the actual | 562 | * inode log item, in preparation for the push routine which does the actual |
@@ -829,9 +820,7 @@ static struct xfs_item_ops xfs_inode_item_ops = { | |||
829 | .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*)) | 820 | .iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*)) |
830 | xfs_inode_item_format, | 821 | xfs_inode_item_format, |
831 | .iop_pin = (void(*)(xfs_log_item_t*))xfs_inode_item_pin, | 822 | .iop_pin = (void(*)(xfs_log_item_t*))xfs_inode_item_pin, |
832 | .iop_unpin = (void(*)(xfs_log_item_t*))xfs_inode_item_unpin, | 823 | .iop_unpin = (void(*)(xfs_log_item_t*, int))xfs_inode_item_unpin, |
833 | .iop_unpin_remove = (void(*)(xfs_log_item_t*, xfs_trans_t*)) | ||
834 | xfs_inode_item_unpin_remove, | ||
835 | .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_inode_item_trylock, | 824 | .iop_trylock = (uint(*)(xfs_log_item_t*))xfs_inode_item_trylock, |
836 | .iop_unlock = (void(*)(xfs_log_item_t*))xfs_inode_item_unlock, | 825 | .iop_unlock = (void(*)(xfs_log_item_t*))xfs_inode_item_unlock, |
837 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 826 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |