]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_dfrag.c
[XFS] remove remaining VN_HOLD calls
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_dfrag.c
index 5f3647cb98851aa13855ed53d26d102bdb0f08c7..d92407842e3bb57939b8023752f6833625ab5546 100644 (file)
@@ -116,7 +116,7 @@ xfs_swapext(
  out_put_file:
        fput(file);
  out_free_sxp:
-       kmem_free(sxp, sizeof(xfs_swapext_t));
+       kmem_free(sxp);
  out:
        return error;
 }
@@ -150,8 +150,8 @@ xfs_swap_extents(
        }
 
        sbp = &sxp->sx_stat;
-       vp = XFS_ITOV(ip);
-       tvp = XFS_ITOV(tip);
+       vp = VFS_I(ip);
+       tvp = VFS_I(tip);
 
        /* Lock in i_ino order */
        if (ip->i_ino < tip->i_ino) {
@@ -350,15 +350,11 @@ xfs_swap_extents(
                break;
        }
 
-       /*
-        * Increment vnode ref counts since xfs_trans_commit &
-        * xfs_trans_cancel will both unlock the inodes and
-        * decrement the associated ref counts.
-        */
-       VN_HOLD(vp);
-       VN_HOLD(tvp);
 
+       IHOLD(ip);
        xfs_trans_ijoin(tp, ip, lock_flags);
+
+       IHOLD(tip);
        xfs_trans_ijoin(tp, tip, lock_flags);
 
        xfs_trans_log_inode(tp, ip,  ilf_fields);
@@ -381,6 +377,6 @@ xfs_swap_extents(
                xfs_iunlock(tip, lock_flags);
        }
        if (tempifp != NULL)
-               kmem_free(tempifp, sizeof(xfs_ifork_t));
+               kmem_free(tempifp);
        return error;
 }