aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-08-26 20:06:03 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2019-08-28 11:31:01 -0400
commitbc46ac64713f11c86cbbe11a86abd2a71274b15f (patch)
treebbafcd890483e673a4194df25dca677bce8fbc34 /fs/xfs/libxfs/xfs_bmap.c
parent2ca09177ab9dae7cc0a888137bd2421f5829cd87 (diff)
xfs: remove unnecessary int returns from deferred rmap functions
Remove the return value from the functions that schedule deferred rmap operations since they never fail and do not return status. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 65f4348af9ae..e82a3ff345af 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1985,11 +1985,8 @@ xfs_bmap_add_extent_delay_real(
1985 } 1985 }
1986 1986
1987 /* add reverse mapping unless caller opted out */ 1987 /* add reverse mapping unless caller opted out */
1988 if (!(bma->flags & XFS_BMAPI_NORMAP)) { 1988 if (!(bma->flags & XFS_BMAPI_NORMAP))
1989 error = xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new); 1989 xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new);
1990 if (error)
1991 goto done;
1992 }
1993 1990
1994 /* convert to a btree if necessary */ 1991 /* convert to a btree if necessary */
1995 if (xfs_bmap_needs_btree(bma->ip, whichfork)) { 1992 if (xfs_bmap_needs_btree(bma->ip, whichfork)) {
@@ -2471,9 +2468,7 @@ xfs_bmap_add_extent_unwritten_real(
2471 } 2468 }
2472 2469
2473 /* update reverse mappings */ 2470 /* update reverse mappings */
2474 error = xfs_rmap_convert_extent(mp, tp, ip, whichfork, new); 2471 xfs_rmap_convert_extent(mp, tp, ip, whichfork, new);
2475 if (error)
2476 goto done;
2477 2472
2478 /* convert to a btree if necessary */ 2473 /* convert to a btree if necessary */
2479 if (xfs_bmap_needs_btree(ip, whichfork)) { 2474 if (xfs_bmap_needs_btree(ip, whichfork)) {
@@ -2832,11 +2827,8 @@ xfs_bmap_add_extent_hole_real(
2832 } 2827 }
2833 2828
2834 /* add reverse mapping unless caller opted out */ 2829 /* add reverse mapping unless caller opted out */
2835 if (!(flags & XFS_BMAPI_NORMAP)) { 2830 if (!(flags & XFS_BMAPI_NORMAP))
2836 error = xfs_rmap_map_extent(tp, ip, whichfork, new); 2831 xfs_rmap_map_extent(tp, ip, whichfork, new);
2837 if (error)
2838 goto done;
2839 }
2840 2832
2841 /* convert to a btree if necessary */ 2833 /* convert to a btree if necessary */
2842 if (xfs_bmap_needs_btree(ip, whichfork)) { 2834 if (xfs_bmap_needs_btree(ip, whichfork)) {
@@ -5149,9 +5141,7 @@ xfs_bmap_del_extent_real(
5149 } 5141 }
5150 5142
5151 /* remove reverse mapping */ 5143 /* remove reverse mapping */
5152 error = xfs_rmap_unmap_extent(tp, ip, whichfork, del); 5144 xfs_rmap_unmap_extent(tp, ip, whichfork, del);
5153 if (error)
5154 goto done;
5155 5145
5156 /* 5146 /*
5157 * If we need to, add to list of extents to delete. 5147 * If we need to, add to list of extents to delete.
@@ -5651,12 +5641,11 @@ done:
5651 &new); 5641 &new);
5652 5642
5653 /* update reverse mapping. rmap functions merge the rmaps for us */ 5643 /* update reverse mapping. rmap functions merge the rmaps for us */
5654 error = xfs_rmap_unmap_extent(tp, ip, whichfork, got); 5644 xfs_rmap_unmap_extent(tp, ip, whichfork, got);
5655 if (error)
5656 return error;
5657 memcpy(&new, got, sizeof(new)); 5645 memcpy(&new, got, sizeof(new));
5658 new.br_startoff = left->br_startoff + left->br_blockcount; 5646 new.br_startoff = left->br_startoff + left->br_blockcount;
5659 return xfs_rmap_map_extent(tp, ip, whichfork, &new); 5647 xfs_rmap_map_extent(tp, ip, whichfork, &new);
5648 return 0;
5660} 5649}
5661 5650
5662static int 5651static int
@@ -5695,10 +5684,9 @@ xfs_bmap_shift_update_extent(
5695 got); 5684 got);
5696 5685
5697 /* update reverse mapping */ 5686 /* update reverse mapping */
5698 error = xfs_rmap_unmap_extent(tp, ip, whichfork, &prev); 5687 xfs_rmap_unmap_extent(tp, ip, whichfork, &prev);
5699 if (error) 5688 xfs_rmap_map_extent(tp, ip, whichfork, got);
5700 return error; 5689 return 0;
5701 return xfs_rmap_map_extent(tp, ip, whichfork, got);
5702} 5690}
5703 5691
5704int 5692int