aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index c7c48da97ad4..d22b580162cc 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1456,7 +1456,7 @@ xfs_itruncate_finish(
1456 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); 1456 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES);
1457 ASSERT(ip->i_transp == *tp); 1457 ASSERT(ip->i_transp == *tp);
1458 ASSERT(ip->i_itemp != NULL); 1458 ASSERT(ip->i_itemp != NULL);
1459 ASSERT(ip->i_itemp->ili_flags & XFS_ILI_HOLD); 1459 ASSERT(ip->i_itemp->ili_lock_flags == 0);
1460 1460
1461 1461
1462 ntp = *tp; 1462 ntp = *tp;
@@ -1608,12 +1608,8 @@ xfs_itruncate_finish(
1608 */ 1608 */
1609 error = xfs_bmap_finish(tp, &free_list, &committed); 1609 error = xfs_bmap_finish(tp, &free_list, &committed);
1610 ntp = *tp; 1610 ntp = *tp;
1611 if (committed) { 1611 if (committed)
1612 /* link the inode into the next xact in the chain */ 1612 xfs_trans_ijoin(ntp, ip);
1613 xfs_trans_ijoin(ntp, ip,
1614 XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
1615 xfs_trans_ihold(ntp, ip);
1616 }
1617 1613
1618 if (error) { 1614 if (error) {
1619 /* 1615 /*
@@ -1642,9 +1638,7 @@ xfs_itruncate_finish(
1642 error = xfs_trans_commit(*tp, 0); 1638 error = xfs_trans_commit(*tp, 0);
1643 *tp = ntp; 1639 *tp = ntp;
1644 1640
1645 /* link the inode into the next transaction in the chain */ 1641 xfs_trans_ijoin(ntp, ip);
1646 xfs_trans_ijoin(ntp, ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
1647 xfs_trans_ihold(ntp, ip);
1648 1642
1649 if (error) 1643 if (error)
1650 return error; 1644 return error;