Skip to content

Commit f1e6a8d

Browse files
author
Darrick J. Wong
committed
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: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 4ed6435 commit f1e6a8d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/xfs/xfs_reflink.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,18 +1138,19 @@ xfs_reflink_remap_extent(
11381138
xfs_refcount_decrease_extent(tp, &smap);
11391139
qdelta -= smap.br_blockcount;
11401140
} else if (smap.br_startblock == DELAYSTARTBLOCK) {
1141-
xfs_filblks_t len = smap.br_blockcount;
1141+
int done;
11421142

11431143
/*
11441144
* If the extent we're unmapping is a delalloc reservation,
11451145
* we can use the regular bunmapi function to release the
11461146
* incore state. Dropping the delalloc reservation takes care
11471147
* of the quota reservation for us.
11481148
*/
1149-
error = __xfs_bunmapi(NULL, ip, smap.br_startoff, &len, 0, 1);
1149+
error = xfs_bunmapi(NULL, ip, smap.br_startoff,
1150+
smap.br_blockcount, 0, 1, &done);
11501151
if (error)
11511152
goto out_cancel;
1152-
ASSERT(len == 0);
1153+
ASSERT(done);
11531154
}
11541155

11551156
/*

0 commit comments

Comments
 (0)