kill I_LOCK
[safe/jmp/linux-2.6] / fs / xfs / xfs_utils.c
index 98e5f11..4d88616 100644 (file)
@@ -166,12 +166,18 @@ xfs_dir_ialloc(
                        xfs_buf_relse(ialloc_context);
                        if (dqinfo) {
                                tp->t_dqinfo = dqinfo;
-                               XFS_TRANS_FREE_DQINFO(tp->t_mountp, tp);
+                               xfs_trans_free_dqinfo(tp);
                        }
                        *tpp = ntp;
                        *ipp = NULL;
                        return code;
                }
+
+               /*
+                * transaction commit worked ok so we can drop the extra ticket
+                * reference that we gained in xfs_trans_dup()
+                */
+               xfs_log_ticket_put(tp->t_ticket);
                code = xfs_trans_reserve(tp, 0, log_res, 0,
                                         XFS_TRANS_PERM_LOG_RES, log_count);
                /*
@@ -237,7 +243,7 @@ xfs_droplink(
 
        ASSERT (ip->i_d.di_nlink > 0);
        ip->i_d.di_nlink--;
-       drop_nlink(ip->i_vnode);
+       drop_nlink(VFS_I(ip));
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 
        error = 0;
@@ -268,9 +274,9 @@ xfs_bump_ino_vers2(
        xfs_mount_t     *mp;
 
        ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
-       ASSERT(ip->i_d.di_version == XFS_DINODE_VERSION_1);
+       ASSERT(ip->i_d.di_version == 1);
 
-       ip->i_d.di_version = XFS_DINODE_VERSION_2;
+       ip->i_d.di_version = 2;
        ip->i_d.di_onlink = 0;
        memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));
        mp = tp->t_mountp;
@@ -301,8 +307,8 @@ xfs_bumplink(
 
        ASSERT(ip->i_d.di_nlink > 0);
        ip->i_d.di_nlink++;
-       inc_nlink(ip->i_vnode);
-       if ((ip->i_d.di_version == XFS_DINODE_VERSION_1) &&
+       inc_nlink(VFS_I(ip));
+       if ((ip->i_d.di_version == 1) &&
            (ip->i_d.di_nlink > XFS_MAXLINK_1)) {
                /*
                 * The inode has increased its number of links beyond
@@ -368,7 +374,7 @@ xfs_truncate_file(
 
        /*
         * Follow the normal truncate locking protocol.  Since we
-        * hold the inode in the transaction, we know that it's number
+        * hold the inode in the transaction, we know that its number
         * of references will stay constant.
         */
        xfs_ilock(ip, XFS_ILOCK_EXCL);