[XFS] Cancel transactions on xfs_itruncate_start error.
authorJesper Juhl <jesper.juhl@gmail.com>
Thu, 28 Jun 2007 06:43:14 +0000 (16:43 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Sat, 14 Jul 2007 05:36:17 +0000 (15:36 +1000)
SGI-PV: 966502
SGI-Modid: xfs-linux-melb:xfs-kern:28943a

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_vnodeops.c

index 8c830a48165aa2366fd270ca42c8ea61e0d913a7..5dbca95598e01d4c3cbf624919717e2f8a86ee7b 100644 (file)
@@ -1263,6 +1263,7 @@ xfs_free_eofblocks(
                error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE,
                                    ip->i_size);
                if (error) {
+                       xfs_trans_cancel(tp, 0);
                        if (use_iolock)
                                xfs_iunlock(ip, XFS_IOLOCK_EXCL);
                        return error;
@@ -1687,6 +1688,7 @@ xfs_inactive(
 
                error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0);
                if (error) {
+                       xfs_trans_cancel(tp, 0);
                        xfs_iunlock(ip, XFS_IOLOCK_EXCL);
                        return VN_INACTIVE_CACHE;
                }