Commit f1e6a8d7 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: remove a __xfs_bunmapi call from reflink

This raw call isn't necessary since we can always remove a full delalloc
extent.
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 4ed6435c
...@@ -1138,7 +1138,7 @@ xfs_reflink_remap_extent( ...@@ -1138,7 +1138,7 @@ xfs_reflink_remap_extent(
xfs_refcount_decrease_extent(tp, &smap); xfs_refcount_decrease_extent(tp, &smap);
qdelta -= smap.br_blockcount; qdelta -= smap.br_blockcount;
} else if (smap.br_startblock == DELAYSTARTBLOCK) { } else if (smap.br_startblock == DELAYSTARTBLOCK) {
xfs_filblks_t len = smap.br_blockcount; int done;
/* /*
* If the extent we're unmapping is a delalloc reservation, * If the extent we're unmapping is a delalloc reservation,
...@@ -1146,10 +1146,11 @@ xfs_reflink_remap_extent( ...@@ -1146,10 +1146,11 @@ xfs_reflink_remap_extent(
* incore state. Dropping the delalloc reservation takes care * incore state. Dropping the delalloc reservation takes care
* of the quota reservation for us. * of the quota reservation for us.
*/ */
error = __xfs_bunmapi(NULL, ip, smap.br_startoff, &len, 0, 1); error = xfs_bunmapi(NULL, ip, smap.br_startoff,
smap.br_blockcount, 0, 1, &done);
if (error) if (error)
goto out_cancel; goto out_cancel;
ASSERT(len == 0); ASSERT(done);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment