Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / fs / xfs / xfs_dfrag.c
index e6d839bddbf008b3bc522720e5f5e0711a954e10..7465f9ee125fcc2b80194043e9c141799a05ffde 100644 (file)
@@ -347,13 +347,15 @@ xfs_swap_extents(
 
        error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
 
-out_unlock:
-       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 out:
        kmem_free(tempifp);
        return error;
 
+out_unlock:
+       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       goto out;
+
 out_trans_cancel:
        xfs_trans_cancel(tp, 0);
        goto out_unlock;