X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fxfs%2Fxfs_dfrag.c;h=de35d18cc002c5eefcf7c631143bdfacef753bf9;hb=d638d4990bfb99998420e78e8fd4607bca5cf8d0;hp=80562b60fb95f5c041ee202701f011d1bb9a648c;hpb=55b4d6a52195a8f277ffddf755ddaff359878f41;p=mv-sheeva.git diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 80562b60fb9..de35d18cc00 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -41,7 +41,6 @@ #include "xfs_itable.h" #include "xfs_dfrag.h" #include "xfs_error.h" -#include "xfs_mac.h" #include "xfs_rw.h" /* @@ -71,7 +70,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 +82,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 +199,9 @@ 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 = bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED); + if (error) + goto error0; } /* Verify O_DIRECT for ftmp */ @@ -383,7 +384,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: