]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_utils.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
[linux-2.6] / fs / xfs / xfs_utils.c
index 948b0c892e9678c1d29165aba906b95c8902c6cf..20ffec308e1e906cd09d661c3a9d409f97b5a8c3 100644 (file)
@@ -420,7 +420,11 @@ xfs_truncate_file(
         * in a transaction.
         */
        xfs_ilock(ip, XFS_IOLOCK_EXCL);
-       xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0);
+       error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0);
+       if (error) {
+               xfs_iunlock(ip, XFS_IOLOCK_EXCL);
+               return error;
+       }
 
        tp = xfs_trans_alloc(mp, XFS_TRANS_TRUNCATE_FILE);
        if ((error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0,