]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_dfrag.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_dfrag.c
index 80562b60fb95f5c041ee202701f011d1bb9a648c..584f1ae85cd9b9537dcf6d052aaf796f81ac0a5b 100644 (file)
@@ -41,8 +41,8 @@
 #include "xfs_itable.h"
 #include "xfs_dfrag.h"
 #include "xfs_error.h"
-#include "xfs_mac.h"
 #include "xfs_rw.h"
+#include "xfs_vnodeops.h"
 
 /*
  * Syssgi interface for swapext
@@ -71,7 +71,7 @@ xfs_swapext(
 
        /* Pull information for the target fd */
        if (((fp = fget((int)sxp->sx_fdtarget)) == NULL) ||
-           ((vp = vn_from_inode(fp->f_dentry->d_inode)) == NULL))  {
+           ((vp = vn_from_inode(fp->f_path.dentry->d_inode)) == NULL))  {
                error = XFS_ERROR(EINVAL);
                goto error0;
        }
@@ -83,7 +83,7 @@ xfs_swapext(
        }
 
        if (((tfp = fget((int)sxp->sx_fdtmp)) == NULL) ||
-           ((tvp = vn_from_inode(tfp->f_dentry->d_inode)) == NULL)) {
+           ((tvp = vn_from_inode(tfp->f_path.dentry->d_inode)) == NULL)) {
                error = XFS_ERROR(EINVAL);
                goto error0;
        }
@@ -200,7 +200,10 @@ xfs_swap_extents(
 
        if (VN_CACHED(tvp) != 0) {
                xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1);
-               bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED);
+               error = xfs_flushinval_pages(tip, 0, -1,
+                               FI_REMAPF_LOCKED);
+               if (error)
+                       goto error0;
        }
 
        /* Verify O_DIRECT for ftmp */
@@ -264,7 +267,7 @@ xfs_swap_extents(
         * fields change.
         */
 
-       bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF);
+       xfs_tosspages(ip, 0, -1, FI_REMAPF);
 
        tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT);
        if ((error = xfs_trans_reserve(tp, 0,
@@ -383,7 +386,7 @@ xfs_swap_extents(
                xfs_trans_set_sync(tp);
        }
 
-       error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT, NULL);
+       error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
        locked = 0;
 
  error0: