Commit 676db7e6 authored by Stephen Lord's avatar Stephen Lord Committed by Stephen Lord

[XFS] remove dead function xfs_trans_iput

SGI Modid: 2.5.x-xfs:slinx:158917a
parent f7b7ed34
......@@ -995,7 +995,6 @@ void xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
void xfs_trans_inode_alloc_buf(xfs_trans_t *, struct xfs_buf *);
int xfs_trans_iget(struct xfs_mount *, xfs_trans_t *,
xfs_ino_t , uint, struct xfs_inode **);
void xfs_trans_iput(xfs_trans_t *, struct xfs_inode *, uint);
void xfs_trans_ijoin(xfs_trans_t *, struct xfs_inode *, uint);
void xfs_trans_ihold(xfs_trans_t *, struct xfs_inode *);
void xfs_trans_ihold_release(xfs_trans_t *, struct xfs_inode *);
......
......@@ -187,106 +187,6 @@ xfs_trans_iget(
}
/*
* Release the inode ip which was previously acquired with xfs_trans_iget()
* or added with xfs_trans_ijoin(). This will decrement the lock
* recursion count of the inode item. If the count goes to less than 0,
* the inode will be unlocked and disassociated from the transaction.
*
* If the inode has been modified within the transaction, it will not be
* unlocked until the transaction commits.
*/
void
xfs_trans_iput(
xfs_trans_t *tp,
xfs_inode_t *ip,
uint lock_flags)
{
xfs_inode_log_item_t *iip;
xfs_log_item_desc_t *lidp;
/*
* If the transaction pointer is NULL, just call xfs_iput().
*/
if (tp == NULL) {
xfs_iput(ip, lock_flags);
}
ASSERT(ip->i_transp == tp);
iip = ip->i_itemp;
ASSERT(iip != NULL);
/*
* Find the item descriptor pointing to this inode's
* log item. It must be there.
*/
lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)iip);
ASSERT(lidp != NULL);
ASSERT(lidp->lid_item == (xfs_log_item_t*)iip);
/*
* Be consistent about the bookkeeping for the inode's
* io lock, but it doesn't mean much really.
*/
ASSERT((iip->ili_flags & XFS_ILI_IOLOCKED_ANY) != XFS_ILI_IOLOCKED_ANY);
if (lock_flags & (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED)) {
ASSERT(iip->ili_flags & XFS_ILI_IOLOCKED_ANY);
ASSERT((!(lock_flags & XFS_IOLOCK_EXCL)) ||
(iip->ili_flags & XFS_ILI_IOLOCKED_EXCL));
ASSERT((!(lock_flags & XFS_IOLOCK_SHARED)) ||
(iip->ili_flags &
(XFS_ILI_IOLOCKED_EXCL | XFS_ILI_IOLOCKED_SHARED)));
if (iip->ili_iolock_recur > 0) {
iip->ili_iolock_recur--;
}
}
/*
* If the release is just for a recursive lock on the inode lock,
* then decrement the count and return. We can assert that
* the caller is dropping an EXCL lock on the inode, because
* inode must be locked EXCL within transactions.
*/
ASSERT(lock_flags & XFS_ILOCK_EXCL);
if (iip->ili_ilock_recur > 0) {
iip->ili_ilock_recur--;
return;
}
ASSERT(iip->ili_iolock_recur == 0);
/*
* If the inode was dirtied within this transaction, it cannot
* be released until the transaction commits.
*/
if (lidp->lid_flags & XFS_LID_DIRTY) {
return;
}
xfs_trans_free_item(tp, lidp);
/*
* Clear the hold and iolocked flags in the inode log item.
* We wouldn't want the next user of the inode to
* get confused. Assert that if the iolocked flag is set
* in the item then we are unlocking it in the call to xfs_iput()
* below.
*/
ASSERT((!(iip->ili_flags & XFS_ILI_IOLOCKED_ANY)) ||
(lock_flags & (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED)));
if (iip->ili_flags & (XFS_ILI_HOLD | XFS_ILI_IOLOCKED_ANY)) {
iip->ili_flags &= ~(XFS_ILI_HOLD | XFS_ILI_IOLOCKED_ANY);
}
/*
* Unlike xfs_brelse() the inode log item cannot be
* freed, because it is embedded within the inode.
* All we have to do is release the inode.
*/
xfs_iput(ip, lock_flags);
return;
}
/*
* Add the locked inode to the transaction.
* The inode must be locked, and it cannot be associated with any
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment