diff options
author | Christoph Hellwig <hch@lst.de> | 2016-10-20 00:54:14 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-10-20 00:54:14 -0400 |
commit | fa5c836ca8eb5bad6316ddfc066acbc4e2485356 (patch) | |
tree | 7a35b262a7c7d6fdb52148b39e11022a7377def2 /fs/xfs/xfs_reflink.c | |
parent | 3ba020befef030aaabbd5eb82a09f6ddf02a9542 (diff) |
xfs: refactor xfs_bunmapi_cow
Split out two helpers for deleting delayed or real extents from the COW fork.
This allows to call them directly from xfs_reflink_cow_end_io once that
function is refactored to iterate the extent tree. It will also allow
to reuse the delalloc deletion from xfs_bunmapi in the future.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_reflink.c')
-rw-r--r-- | fs/xfs/xfs_reflink.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 9c477de3c1ac..09bd5dcd90cd 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c | |||
@@ -534,11 +534,6 @@ xfs_reflink_cancel_cow_blocks( | |||
534 | trace_xfs_reflink_cancel_cow(ip, &irec); | 534 | trace_xfs_reflink_cancel_cow(ip, &irec); |
535 | 535 | ||
536 | if (irec.br_startblock == DELAYSTARTBLOCK) { | 536 | if (irec.br_startblock == DELAYSTARTBLOCK) { |
537 | /* Free a delayed allocation. */ | ||
538 | xfs_mod_fdblocks(ip->i_mount, irec.br_blockcount, | ||
539 | false); | ||
540 | ip->i_delayed_blks -= irec.br_blockcount; | ||
541 | |||
542 | /* Remove the mapping from the CoW fork. */ | 537 | /* Remove the mapping from the CoW fork. */ |
543 | error = xfs_bunmapi_cow(ip, &irec); | 538 | error = xfs_bunmapi_cow(ip, &irec); |
544 | if (error) | 539 | if (error) |