diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2007-06-28 02:43:14 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-07-14 01:36:17 -0400 |
commit | 87ae3c2411cfd280e8289e232b718fae9f63950b (patch) | |
tree | 2d19a572a2ab205265306e420fbe4ca1b94fc135 /fs/xfs/xfs_vnodeops.c | |
parent | 39726be2a2e6e61f352852da2c3a807773e33346 (diff) |
[XFS] Cancel transactions on xfs_itruncate_start error.
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>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 8c830a48165a..5dbca95598e0 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -1263,6 +1263,7 @@ xfs_free_eofblocks( | |||
1263 | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, | 1263 | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, |
1264 | ip->i_size); | 1264 | ip->i_size); |
1265 | if (error) { | 1265 | if (error) { |
1266 | xfs_trans_cancel(tp, 0); | ||
1266 | if (use_iolock) | 1267 | if (use_iolock) |
1267 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | 1268 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); |
1268 | return error; | 1269 | return error; |
@@ -1687,6 +1688,7 @@ xfs_inactive( | |||
1687 | 1688 | ||
1688 | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0); | 1689 | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0); |
1689 | if (error) { | 1690 | if (error) { |
1691 | xfs_trans_cancel(tp, 0); | ||
1690 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | 1692 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); |
1691 | return VN_INACTIVE_CACHE; | 1693 | return VN_INACTIVE_CACHE; |
1692 | } | 1694 | } |