From: Jesper Juhl Date: Thu, 28 Jun 2007 06:43:14 +0000 (+1000) Subject: [XFS] Cancel transactions on xfs_itruncate_start error. X-Git-Tag: v2.6.23-rc1~1056^2~14 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=87ae3c2411cfd280e8289e232b718fae9f63950b;p=~emulex%2Finfiniband.git [XFS] Cancel transactions on xfs_itruncate_start error. SGI-PV: 966502 SGI-Modid: xfs-linux-melb:xfs-kern:28943a Signed-off-by: Jesper Juhl Signed-off-by: David Chinner Signed-off-by: Tim Shimmin --- diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 8c830a48165..5dbca95598e 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -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; }