summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_bmap_item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-05-02 10:33:55 +0300
committerChandan Babu R <chandanbabu@kernel.org>2024-05-03 08:50:06 +0300
commit25576c5420e61dea4c2b52942460f2221b8e46e8 (patch)
tree0d65a937a6a82f99bfa50bc6e93a673fc19820dd /fs/xfs/xfs_bmap_item.c
parent86de848403abda05bf9c16dcdb6bef65a8d88c41 (diff)
downloadlinux-25576c5420e61dea4c2b52942460f2221b8e46e8.tar.xz
xfs: simplify iext overflow checking and upgrade
Currently the calls to xfs_iext_count_may_overflow and xfs_iext_count_upgrade are always paired. Merge them into a single function to simplify the callers and the actual check and upgrade logic itself. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_bmap_item.c')
-rw-r--r--fs/xfs/xfs_bmap_item.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index d27859a684aa..a19d62e78aa1 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -524,9 +524,7 @@ xfs_bmap_recover_work(
else
iext_delta = XFS_IEXT_PUNCH_HOLE_CNT;
- error = xfs_iext_count_may_overflow(ip, work->bi_whichfork, iext_delta);
- if (error == -EFBIG)
- error = xfs_iext_count_upgrade(tp, ip, iext_delta);
+ error = xfs_iext_count_extend(tp, ip, work->bi_whichfork, iext_delta);
if (error)
goto err_cancel;