]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: simplify xfs_trans_ijoin* again
authorChristoph Hellwig <hch@infradead.org>
Mon, 19 Sep 2011 15:00:54 +0000 (15:00 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 12 Oct 2011 02:15:08 +0000 (21:15 -0500)
There is no reason to keep a reference to the inode even if we unlock
it during transaction commit because we never drop a reference between
the ijoin and commit.  Also use this fact to merge xfs_trans_ijoin_ref
back into xfs_trans_ijoin - the third argument decides if an unlock
is needed now.

I'm actually starting to wonder if allowing inodes to be unlocked
at transaction commit really is worth the effort.  The only real
benefit is that they can be unlocked earlier when commiting a
synchronous transactions, but that could be solved by doing the
log force manually after the unlock, too.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
18 files changed:
fs/xfs/xfs_attr.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_dquot.c
fs/xfs/xfs_file.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_qm_syscalls.c
fs/xfs/xfs_rename.c
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_super.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_vnodeops.c

index 5484766938f946b2376577af0f23a60191463c78..981a0624f382f3713549cb34023cefda621a44af 100644 (file)
@@ -319,7 +319,7 @@ xfs_attr_set_int(
                return (error);
        }
 
-       xfs_trans_ijoin(args.trans, dp);
+       xfs_trans_ijoin(args.trans, dp, 0);
 
        /*
         * If the attribute list is non-existent or a shortform list,
@@ -389,7 +389,7 @@ xfs_attr_set_int(
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args.trans, dp);
+                       xfs_trans_ijoin(args.trans, dp, 0);
 
                /*
                 * Commit the leaf transformation.  We'll need another (linked)
@@ -537,7 +537,7 @@ xfs_attr_remove_int(xfs_inode_t *dp, struct xfs_name *name, int flags)
         * No need to make quota reservations here. We expect to release some
         * blocks not allocate in the common case.
         */
-       xfs_trans_ijoin(args.trans, dp);
+       xfs_trans_ijoin(args.trans, dp, 0);
 
        /*
         * Decide on what work routines to call based on the inode size.
@@ -809,7 +809,7 @@ xfs_attr_inactive(xfs_inode_t *dp)
         * No need to make quota reservations here. We expect to release some
         * blocks, not allocate, in the common case.
         */
-       xfs_trans_ijoin(trans, dp);
+       xfs_trans_ijoin(trans, dp, 0);
 
        /*
         * Decide on what work routines to call based on the inode size.
@@ -961,7 +961,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                /*
                 * Commit the current trans (including the inode) and start
@@ -1063,7 +1063,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                } else
                        xfs_da_buf_done(bp);
 
@@ -1137,7 +1137,7 @@ xfs_attr_leaf_removename(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
        } else
                xfs_da_buf_done(bp);
        return(0);
@@ -1291,7 +1291,7 @@ xfs_attr_node_addname(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
 
                        /*
                         * Commit the node conversion and start the next
@@ -1328,7 +1328,7 @@ xfs_attr_node_addname(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
        } else {
                /*
                 * Addition succeeded, update Btree hashvals.
@@ -1440,7 +1440,7 @@ xfs_attr_node_addname(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                }
 
                /*
@@ -1572,7 +1572,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                /*
                 * Commit the Btree join operation and start a new trans.
@@ -1623,7 +1623,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
                         * in all transactions.
                         */
                        if (committed)
-                               xfs_trans_ijoin(args->trans, dp);
+                               xfs_trans_ijoin(args->trans, dp, 0);
                } else
                        xfs_da_brelse(args->trans, bp);
        }
@@ -2060,7 +2060,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, dp);
+                       xfs_trans_ijoin(args->trans, dp, 0);
 
                ASSERT(nmap == 1);
                ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
@@ -2207,7 +2207,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
                 * a new one.  We need the inode to be in all transactions.
                 */
                if (committed)
-                       xfs_trans_ijoin(args->trans, args->dp);
+                       xfs_trans_ijoin(args->trans, args->dp, 0);
 
                /*
                 * Close out trans and start the next one in the chain.
index bb31d37bf49b0c62114a6aa890eceea42fbc16a5..c68baeb0974adb2e57f690496fa8957c94c92e0d 100644 (file)
@@ -2195,7 +2195,7 @@ xfs_bmap_rtalloc(
         * Lock out other modifications to the RT bitmap inode.
         */
        xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(ap->tp, mp->m_rbmip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(ap->tp, mp->m_rbmip, XFS_ILOCK_EXCL);
 
        /*
         * If it's an allocation to an empty file at offset 0,
@@ -3460,7 +3460,7 @@ xfs_bmap_add_attrfork(
        }
        ASSERT(ip->i_d.di_anextents == 0);
 
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 
        switch (ip->i_d.di_format) {
index 645387b697385e36d704d15ef340477c3393e2ae..654dc6f05bac7781f288f63fbcb1a5a970b06faa 100644 (file)
@@ -425,8 +425,8 @@ xfs_swap_extents(
        }
 
 
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_trans_ijoin(tp, tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 
        xfs_trans_log_inode(tp, ip,  ilf_fields);
        xfs_trans_log_inode(tp, tip, tilf_fields);
index 179673531f20911e7ccdc842a82af85eb08e1298..c597bfe4ada04a11335d924916242daf5f819e2c 100644 (file)
@@ -377,7 +377,7 @@ xfs_qm_dqalloc(
                return (ESRCH);
        }
 
-       xfs_trans_ijoin_ref(tp, quotip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
        nmaps = 1;
        error = xfs_bmapi_write(tp, quotip, offset_fsb,
                                XFS_DQUOT_CLUSTER_SIZE_FSB, XFS_BMAPI_METADATA,
index d8ef02eb178a8e3e128b35f8f4ecfa15a204a6fc..0b600b51778c8327e97e1ca33a73feef21e2eda6 100644 (file)
@@ -213,7 +213,7 @@ xfs_file_fsync(
                 * transaction.  So we play it safe and fire off the
                 * transaction anyway.
                 */
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
                xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
                error = xfs_trans_commit(tp, 0);
 
index f690d3a10b34a96bc3057ea40640a073eaac0f7f..b676494a55ca7ffc41cb0998685ea0f0523537b2 100644 (file)
@@ -1152,7 +1152,7 @@ xfs_ialloc(
        /*
         * Log the new values stuffed into the inode.
         */
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
        xfs_trans_log_inode(tp, ip, flags);
 
        /* now that we have an i_mode we can setup inode ops and unlock */
@@ -1297,7 +1297,7 @@ xfs_itruncate_extents(
                 */
                error = xfs_bmap_finish(&tp, &free_list, &committed);
                if (committed)
-                       xfs_trans_ijoin(tp, ip);
+                       xfs_trans_ijoin(tp, ip, 0);
                if (error)
                        goto out_bmap_cancel;
 
@@ -1313,7 +1313,7 @@ xfs_itruncate_extents(
                error = xfs_trans_commit(tp, 0);
                tp = ntp;
 
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                if (error)
                        goto out;
index 588406dc6a35a93560c1728465d940b85848d401..8704a99241d71f28130290d5cc96484d85cfca5a 100644 (file)
@@ -658,10 +658,8 @@ xfs_inode_item_unlock(
 
        lock_flags = iip->ili_lock_flags;
        iip->ili_lock_flags = 0;
-       if (lock_flags) {
+       if (lock_flags)
                xfs_iunlock(ip, lock_flags);
-               IRELE(ip);
-       }
 }
 
 /*
index f7ce7debe14c48a55f0003454bc43fa678961ca0..d99a905189091c9b74fa23f6483d8a2713ae7c4a 100644 (file)
@@ -1069,7 +1069,7 @@ xfs_ioctl_setattr(
                }
        }
 
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
 
        /*
         * Change file ownership.  Must be the owner or privileged.
index da5bf05c5bb71bc87c7bd4ea3e67104b5fe65b73..9afa282aa937b473aad0d90fc6f2a0bfb659dd29 100644 (file)
@@ -208,7 +208,7 @@ xfs_iomap_write_direct(
        if (error)
                goto error1;
 
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
 
        bmapi_flag = 0;
        if (offset < ip->i_size || extsz)
@@ -528,7 +528,7 @@ xfs_iomap_write_allocate(
                                return XFS_ERROR(error);
                        }
                        xfs_ilock(ip, XFS_ILOCK_EXCL);
-                       xfs_trans_ijoin(tp, ip);
+                       xfs_trans_ijoin(tp, ip, 0);
 
                        xfs_bmap_init(&free_list, &first_block);
 
@@ -692,7 +692,7 @@ xfs_iomap_write_unwritten(
                }
 
                xfs_ilock(ip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                /*
                 * Modify the unwritten extent state of the buffer.
index e6b3e76208887d2a1737515bc8f116ad9976ac1a..556bbe7751b7aacd87292a64823eecdac862d72d 100644 (file)
@@ -611,7 +611,7 @@ xfs_setattr_nonsize(
                }
        }
 
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
 
        /*
         * Change file ownership.  Must be the owner or privileged.
@@ -863,7 +863,7 @@ xfs_setattr_size(
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
 
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
 
        /*
         * Only change the c/mtime if we are changing the size or we are
index 609246f42e6c7c1d9a9253c909383f8aa947899a..5cc3dde1bc9039de237a102c466b1fb4aa249cf8 100644 (file)
@@ -261,7 +261,7 @@ xfs_qm_scall_trunc_qfile(
        }
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
 
        error = xfs_itruncate_data(&tp, ip, 0);
        if (error) {
index df78c297d1a1e628d861d7b86b3f632a12ca5f63..866de277079a2c35f89230e68e386e4b8b6ebb2b 100644 (file)
@@ -170,12 +170,12 @@ xfs_rename(
         * we can rely on either trans_commit or trans_cancel to unlock
         * them.
         */
-       xfs_trans_ijoin_ref(tp, src_dp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL);
        if (new_parent)
-               xfs_trans_ijoin_ref(tp, target_dp, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, src_ip, XFS_ILOCK_EXCL);
+               xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL);
        if (target_ip)
-               xfs_trans_ijoin_ref(tp, target_ip, XFS_ILOCK_EXCL);
+               xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL);
 
        /*
         * If we are using project inheritance, we only allow renames
index f29424964521fa5a6492dc63897bc264fdd7af10..87323f1ded6466482f40b019d81fbbcc4905e400 100644 (file)
@@ -112,7 +112,7 @@ xfs_growfs_rt_alloc(
                 * Lock the inode.
                 */
                xfs_ilock(ip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+               xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 
                xfs_bmap_init(&flist, &firstblock);
                /*
@@ -155,7 +155,7 @@ xfs_growfs_rt_alloc(
                         * Lock the bitmap inode.
                         */
                        xfs_ilock(ip, XFS_ILOCK_EXCL);
-                       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+                       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
                        /*
                         * Get a buffer for the block.
                         */
@@ -1960,7 +1960,7 @@ xfs_growfs_rt(
                 * Lock out other callers by grabbing the bitmap inode lock.
                 */
                xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin_ref(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
+               xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
                /*
                 * Update the bitmap inode's size.
                 */
@@ -1972,7 +1972,7 @@ xfs_growfs_rt(
                 * Get the summary inode into the transaction.
                 */
                xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin_ref(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
+               xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
                /*
                 * Update the summary inode's size.
                 */
@@ -2143,7 +2143,7 @@ xfs_rtfree_extent(
         * Synchronize by locking the bitmap inode.
         */
        xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
 
 #if defined(__KERNEL__) && defined(DEBUG)
        /*
index 54d5e102ffe1a47e227c3ec5b5f5a8231624b95c..6ad05e68abdaf1e2706e07cbdca582049f8f8177 100644 (file)
@@ -884,7 +884,7 @@ xfs_log_inode(
        }
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        return xfs_trans_commit(tp, 0);
 }
index b64c8c79736a4d6627367c4436ede9fc01bb8af9..1f35b2feca978a515cbdc318b93eb50e48f54127 100644 (file)
@@ -2018,6 +2018,6 @@ xfs_trans_roll(
        if (error)
                return error;
 
-       xfs_trans_ijoin(trans, dp);
+       xfs_trans_ijoin(trans, dp, 0);
        return 0;
 }
index 54b0b1cc3e3fbcaa6bad4a9158fff8607e66735d..f5df16969f821e12df58dc002d09dcd15f732e96 100644 (file)
@@ -470,8 +470,7 @@ void                xfs_trans_stale_inode_buf(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
 void           xfs_trans_inode_alloc_buf(xfs_trans_t *, struct xfs_buf *);
 void           xfs_trans_ichgtime(struct xfs_trans *, struct xfs_inode *, int);
-void           xfs_trans_ijoin_ref(struct xfs_trans *, struct xfs_inode *, uint);
-void           xfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *);
+void           xfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint);
 void           xfs_trans_log_buf(xfs_trans_t *, struct xfs_buf *, uint, uint);
 void           xfs_trans_log_inode(xfs_trans_t *, struct xfs_inode *, uint);
 struct xfs_efi_log_item        *xfs_trans_get_efi(xfs_trans_t *, uint);
index c8dea2fd7e68055db306018667aa87ad707befa3..32f0288ae10f30abe1f67d3ebcb766926fe8de7b 100644 (file)
@@ -47,11 +47,13 @@ xfs_trans_inode_broot_debug(
  * Add a locked inode to the transaction.
  *
  * The inode must be locked, and it cannot be associated with any transaction.
+ * If lock_flags is non-zero the inode will be unlocked on transaction commit.
  */
 void
 xfs_trans_ijoin(
        struct xfs_trans        *tp,
-       struct xfs_inode        *ip)
+       struct xfs_inode        *ip,
+       uint                    lock_flags)
 {
        xfs_inode_log_item_t    *iip;
 
@@ -59,7 +61,9 @@ xfs_trans_ijoin(
        if (ip->i_itemp == NULL)
                xfs_inode_item_init(ip, ip->i_mount);
        iip = ip->i_itemp;
+
        ASSERT(iip->ili_lock_flags == 0);
+       iip->ili_lock_flags = lock_flags;
 
        /*
         * Get a log_item_desc to point at the new item.
@@ -69,25 +73,6 @@ xfs_trans_ijoin(
        xfs_trans_inode_broot_debug(ip);
 }
 
-/*
- * Add a locked inode to the transaction.
- *
- *
- * Grabs a reference to the inode which will be dropped when the transaction
- * is committed.  The inode will also be unlocked at that point.  The inode
- * must be locked, and it cannot be associated with any transaction.
- */
-void
-xfs_trans_ijoin_ref(
-       struct xfs_trans        *tp,
-       struct xfs_inode        *ip,
-       uint                    lock_flags)
-{
-       xfs_trans_ijoin(tp, ip);
-       IHOLD(ip);
-       ip->i_itemp->ili_lock_flags = lock_flags;
-}
-
 /*
  * Transactional inode timestamp update. Requires the inode to be locked and
  * joined to the transaction supplied. Relies on the transaction subsystem to
index c9c8e8230b21ce79cad6aaa574534a8571d1dbcd..fc38f15808c691ec57f14fe568817ef10f0b7c6e 100644 (file)
@@ -219,7 +219,7 @@ xfs_free_eofblocks(
                }
 
                xfs_ilock(ip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                error = xfs_itruncate_data(&tp, ip, ip->i_size);
                if (error) {
@@ -288,7 +288,7 @@ xfs_inactive_symlink_rmt(
        xfs_ilock(ip, XFS_IOLOCK_EXCL | XFS_ILOCK_EXCL);
        size = (int)ip->i_d.di_size;
        ip->i_d.di_size = 0;
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        /*
         * Find the block(s) so we can inval and unmap them.
@@ -336,7 +336,7 @@ xfs_inactive_symlink_rmt(
         * Mark it dirty so it will be logged and moved forward in the log as
         * part of every commit.
         */
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        /*
         * Get a new, empty transaction to return to our caller.
@@ -469,7 +469,7 @@ xfs_inactive_attrs(
                goto error_cancel;
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
        xfs_idestroy_fork(ip, XFS_ATTR_FORK);
 
        ASSERT(ip->i_d.di_anextents == 0);
@@ -663,7 +663,7 @@ xfs_inactive(
                }
 
                xfs_ilock(ip, XFS_ILOCK_EXCL);
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                error = xfs_itruncate_data(&tp, ip, 0);
                if (error) {
@@ -687,7 +687,7 @@ xfs_inactive(
                        return VN_INACTIVE_CACHE;
                }
 
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
        } else {
                error = xfs_trans_reserve(tp, 0,
                                          XFS_IFREE_LOG_RES(mp),
@@ -700,7 +700,7 @@ xfs_inactive(
                }
 
                xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
        }
 
        /*
@@ -940,7 +940,7 @@ xfs_create(
         * the transaction cancel unlocking dp so don't do it explicitly in the
         * error path.
         */
-       xfs_trans_ijoin_ref(tp, dp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
        unlock_dp_on_error = B_FALSE;
 
        error = xfs_dir_createname(tp, dp, name, ip->i_ino,
@@ -1261,8 +1261,8 @@ xfs_remove(
 
        xfs_lock_two_inodes(dp, ip, XFS_ILOCK_EXCL);
 
-       xfs_trans_ijoin_ref(tp, dp, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 
        /*
         * If we're removing a directory perform some additional validation.
@@ -1407,8 +1407,8 @@ xfs_link(
 
        xfs_lock_two_inodes(sip, tdp, XFS_ILOCK_EXCL);
 
-       xfs_trans_ijoin_ref(tp, sip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, tdp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL);
 
        /*
         * If the source has too many links, we can't make any more to it.
@@ -1602,7 +1602,7 @@ xfs_symlink(
         * transaction cancel unlocking dp so don't do it explicitly in the
         * error path.
         */
-       xfs_trans_ijoin_ref(tp, dp, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL);
        unlock_dp_on_error = B_FALSE;
 
        /*
@@ -1735,7 +1735,7 @@ xfs_set_dmattrs(
                return error;
        }
        xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 
        ip->i_d.di_dmevmask = evmask;
        ip->i_d.di_dmstate  = state;
@@ -1878,7 +1878,7 @@ xfs_alloc_file_space(
                if (error)
                        goto error1;
 
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                xfs_bmap_init(&free_list, &firstfsb);
                error = xfs_bmapi_write(tp, ip, startoffset_fsb,
@@ -2176,7 +2176,7 @@ xfs_free_file_space(
                if (error)
                        goto error1;
 
-               xfs_trans_ijoin(tp, ip);
+               xfs_trans_ijoin(tp, ip, 0);
 
                /*
                 * issue the bunmapi() call to free the blocks
@@ -2349,7 +2349,7 @@ xfs_change_file_space(
        }
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
-       xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
+       xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 
        if ((attr_flags & XFS_ATTR_DMI) == 0) {
                ip->i_d.di_mode &= ~S_ISUID;