diff options
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index addbd74ecd8e..ae3cc393724f 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -1584,7 +1584,7 @@ xfs_swap_extent_rmap( | |||
1584 | tirec.br_blockcount, &irec, | 1584 | tirec.br_blockcount, &irec, |
1585 | &nimaps, 0); | 1585 | &nimaps, 0); |
1586 | if (error) | 1586 | if (error) |
1587 | goto out_defer; | 1587 | goto out; |
1588 | ASSERT(nimaps == 1); | 1588 | ASSERT(nimaps == 1); |
1589 | ASSERT(tirec.br_startoff == irec.br_startoff); | 1589 | ASSERT(tirec.br_startoff == irec.br_startoff); |
1590 | trace_xfs_swap_extent_rmap_remap_piece(ip, &irec); | 1590 | trace_xfs_swap_extent_rmap_remap_piece(ip, &irec); |
@@ -1599,22 +1599,22 @@ xfs_swap_extent_rmap( | |||
1599 | /* Remove the mapping from the donor file. */ | 1599 | /* Remove the mapping from the donor file. */ |
1600 | error = xfs_bmap_unmap_extent(tp, tip, &uirec); | 1600 | error = xfs_bmap_unmap_extent(tp, tip, &uirec); |
1601 | if (error) | 1601 | if (error) |
1602 | goto out_defer; | 1602 | goto out; |
1603 | 1603 | ||
1604 | /* Remove the mapping from the source file. */ | 1604 | /* Remove the mapping from the source file. */ |
1605 | error = xfs_bmap_unmap_extent(tp, ip, &irec); | 1605 | error = xfs_bmap_unmap_extent(tp, ip, &irec); |
1606 | if (error) | 1606 | if (error) |
1607 | goto out_defer; | 1607 | goto out; |
1608 | 1608 | ||
1609 | /* Map the donor file's blocks into the source file. */ | 1609 | /* Map the donor file's blocks into the source file. */ |
1610 | error = xfs_bmap_map_extent(tp, ip, &uirec); | 1610 | error = xfs_bmap_map_extent(tp, ip, &uirec); |
1611 | if (error) | 1611 | if (error) |
1612 | goto out_defer; | 1612 | goto out; |
1613 | 1613 | ||
1614 | /* Map the source file's blocks into the donor file. */ | 1614 | /* Map the source file's blocks into the donor file. */ |
1615 | error = xfs_bmap_map_extent(tp, tip, &irec); | 1615 | error = xfs_bmap_map_extent(tp, tip, &irec); |
1616 | if (error) | 1616 | if (error) |
1617 | goto out_defer; | 1617 | goto out; |
1618 | 1618 | ||
1619 | error = xfs_defer_finish(tpp); | 1619 | error = xfs_defer_finish(tpp); |
1620 | tp = *tpp; | 1620 | tp = *tpp; |
@@ -1636,8 +1636,6 @@ xfs_swap_extent_rmap( | |||
1636 | tip->i_d.di_flags2 = tip_flags2; | 1636 | tip->i_d.di_flags2 = tip_flags2; |
1637 | return 0; | 1637 | return 0; |
1638 | 1638 | ||
1639 | out_defer: | ||
1640 | xfs_defer_cancel(tp); | ||
1641 | out: | 1639 | out: |
1642 | trace_xfs_swap_extent_rmap_error(ip, error, _RET_IP_); | 1640 | trace_xfs_swap_extent_rmap_error(ip, error, _RET_IP_); |
1643 | tip->i_d.di_flags2 = tip_flags2; | 1641 | tip->i_d.di_flags2 = tip_flags2; |