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>
This commit is contained in:
parent
e98c414f9a
commit
9412e3181c
6 changed files with 47 additions and 136 deletions
|
@ -544,10 +544,10 @@ xfs_inode_item_pin(
|
|||
*
|
||||
* Also wake up anyone in xfs_iunpin_wait() if the count goes to 0.
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
STATIC void
|
||||
xfs_inode_item_unpin(
|
||||
xfs_inode_log_item_t *iip)
|
||||
xfs_inode_log_item_t *iip,
|
||||
int remove)
|
||||
{
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
|
||||
|
@ -557,15 +557,6 @@ xfs_inode_item_unpin(
|
|||
wake_up(&ip->i_ipin_wait);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
STATIC void
|
||||
xfs_inode_item_unpin_remove(
|
||||
xfs_inode_log_item_t *iip,
|
||||
xfs_trans_t *tp)
|
||||
{
|
||||
xfs_inode_item_unpin(iip);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called to attempt to lock the inode associated with this
|
||||
* 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 = {
|
|||
.iop_format = (void(*)(xfs_log_item_t*, xfs_log_iovec_t*))
|
||||
xfs_inode_item_format,
|
||||
.iop_pin = (void(*)(xfs_log_item_t*))xfs_inode_item_pin,
|
||||
.iop_unpin = (void(*)(xfs_log_item_t*))xfs_inode_item_unpin,
|
||||
.iop_unpin_remove = (void(*)(xfs_log_item_t*, xfs_trans_t*))
|
||||
xfs_inode_item_unpin_remove,
|
||||
.iop_unpin = (void(*)(xfs_log_item_t*, int))xfs_inode_item_unpin,
|
||||
.iop_trylock = (uint(*)(xfs_log_item_t*))xfs_inode_item_trylock,
|
||||
.iop_unlock = (void(*)(xfs_log_item_t*))xfs_inode_item_unlock,
|
||||
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue