]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_dfrag.c
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_dfrag.c
index 070259a4254c41a6fc370f9c43e42e253fb0e496..c6191d00ad27fb721e11c2639e02a3c199653279 100644 (file)
@@ -60,8 +60,6 @@ xfs_swapext(
        xfs_bstat_t     *sbp;
        struct file     *fp = NULL, *tfp = NULL;
        vnode_t         *vp, *tvp;
-       bhv_desc_t      *bdp, *tbdp;
-       vn_bhv_head_t   *bhp, *tbhp;
        static uint     lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL;
        int             ilf_fields, tilf_fields;
        int             error = 0;
@@ -90,13 +88,10 @@ xfs_swapext(
                goto error0;
        }
 
-       bhp = VN_BHV_HEAD(vp);
-       bdp = vn_bhv_lookup(bhp, &xfs_vnodeops);
-       if (bdp == NULL) {
+       ip = xfs_vtoi(vp);
+       if (ip == NULL) {
                error = XFS_ERROR(EBADF);
                goto error0;
-       } else {
-               ip = XFS_BHVTOI(bdp);
        }
 
        if (((tfp = fget((int)sxp->sx_fdtmp)) == NULL) ||
@@ -105,13 +100,10 @@ xfs_swapext(
                goto error0;
        }
 
-       tbhp = VN_BHV_HEAD(tvp);
-       tbdp = vn_bhv_lookup(tbhp, &xfs_vnodeops);
-       if (tbdp == NULL) {
+       tip = xfs_vtoi(tvp);
+       if (tip == NULL) {
                error = XFS_ERROR(EBADF);
                goto error0;
-       } else {
-               tip = XFS_BHVTOI(tbdp);
        }
 
        if (ip->i_mount != tip->i_mount) {