mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
xfs: remove unnecessary int returns from deferred bmap functions
Remove the return value from the functions that schedule deferred bmap 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>
This commit is contained in:
parent
74b4c5d4a9
commit
3e08f42ae7
5 changed files with 15 additions and 29 deletions
|
@ -6085,29 +6085,29 @@ __xfs_bmap_add(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Map an extent into a file. */
|
/* Map an extent into a file. */
|
||||||
int
|
void
|
||||||
xfs_bmap_map_extent(
|
xfs_bmap_map_extent(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
struct xfs_bmbt_irec *PREV)
|
struct xfs_bmbt_irec *PREV)
|
||||||
{
|
{
|
||||||
if (!xfs_bmap_is_update_needed(PREV))
|
if (!xfs_bmap_is_update_needed(PREV))
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
return __xfs_bmap_add(tp, XFS_BMAP_MAP, ip, XFS_DATA_FORK, PREV);
|
__xfs_bmap_add(tp, XFS_BMAP_MAP, ip, XFS_DATA_FORK, PREV);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unmap an extent out of a file. */
|
/* Unmap an extent out of a file. */
|
||||||
int
|
void
|
||||||
xfs_bmap_unmap_extent(
|
xfs_bmap_unmap_extent(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
struct xfs_bmbt_irec *PREV)
|
struct xfs_bmbt_irec *PREV)
|
||||||
{
|
{
|
||||||
if (!xfs_bmap_is_update_needed(PREV))
|
if (!xfs_bmap_is_update_needed(PREV))
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
return __xfs_bmap_add(tp, XFS_BMAP_UNMAP, ip, XFS_DATA_FORK, PREV);
|
__xfs_bmap_add(tp, XFS_BMAP_UNMAP, ip, XFS_DATA_FORK, PREV);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -254,9 +254,9 @@ int xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
enum xfs_bmap_intent_type type, int whichfork,
|
enum xfs_bmap_intent_type type, int whichfork,
|
||||||
xfs_fileoff_t startoff, xfs_fsblock_t startblock,
|
xfs_fileoff_t startoff, xfs_fsblock_t startblock,
|
||||||
xfs_filblks_t *blockcount, xfs_exntst_t state);
|
xfs_filblks_t *blockcount, xfs_exntst_t state);
|
||||||
int xfs_bmap_map_extent(struct xfs_trans *tp, struct xfs_inode *ip,
|
void xfs_bmap_map_extent(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
struct xfs_bmbt_irec *imap);
|
struct xfs_bmbt_irec *imap);
|
||||||
int xfs_bmap_unmap_extent(struct xfs_trans *tp, struct xfs_inode *ip,
|
void xfs_bmap_unmap_extent(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
struct xfs_bmbt_irec *imap);
|
struct xfs_bmbt_irec *imap);
|
||||||
|
|
||||||
static inline int xfs_bmap_fork_to_state(int whichfork)
|
static inline int xfs_bmap_fork_to_state(int whichfork)
|
||||||
|
|
|
@ -542,9 +542,7 @@ xfs_bui_recover(
|
||||||
irec.br_blockcount = count;
|
irec.br_blockcount = count;
|
||||||
irec.br_startoff = bmap->me_startoff;
|
irec.br_startoff = bmap->me_startoff;
|
||||||
irec.br_state = state;
|
irec.br_state = state;
|
||||||
error = xfs_bmap_unmap_extent(tp, ip, &irec);
|
xfs_bmap_unmap_extent(tp, ip, &irec);
|
||||||
if (error)
|
|
||||||
goto err_inode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_bit(XFS_BUI_RECOVERED, &buip->bui_flags);
|
set_bit(XFS_BUI_RECOVERED, &buip->bui_flags);
|
||||||
|
|
|
@ -1532,24 +1532,16 @@ xfs_swap_extent_rmap(
|
||||||
trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec);
|
trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec);
|
||||||
|
|
||||||
/* Remove the mapping from the donor file. */
|
/* Remove the mapping from the donor file. */
|
||||||
error = xfs_bmap_unmap_extent(tp, tip, &uirec);
|
xfs_bmap_unmap_extent(tp, tip, &uirec);
|
||||||
if (error)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Remove the mapping from the source file. */
|
/* Remove the mapping from the source file. */
|
||||||
error = xfs_bmap_unmap_extent(tp, ip, &irec);
|
xfs_bmap_unmap_extent(tp, ip, &irec);
|
||||||
if (error)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Map the donor file's blocks into the source file. */
|
/* Map the donor file's blocks into the source file. */
|
||||||
error = xfs_bmap_map_extent(tp, ip, &uirec);
|
xfs_bmap_map_extent(tp, ip, &uirec);
|
||||||
if (error)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* Map the source file's blocks into the donor file. */
|
/* Map the source file's blocks into the donor file. */
|
||||||
error = xfs_bmap_map_extent(tp, tip, &irec);
|
xfs_bmap_map_extent(tp, tip, &irec);
|
||||||
if (error)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
error = xfs_defer_finish(tpp);
|
error = xfs_defer_finish(tpp);
|
||||||
tp = *tpp;
|
tp = *tpp;
|
||||||
|
|
|
@ -676,9 +676,7 @@ xfs_reflink_end_cow_extent(
|
||||||
xfs_refcount_free_cow_extent(tp, del.br_startblock, del.br_blockcount);
|
xfs_refcount_free_cow_extent(tp, del.br_startblock, del.br_blockcount);
|
||||||
|
|
||||||
/* Map the new blocks into the data fork. */
|
/* Map the new blocks into the data fork. */
|
||||||
error = xfs_bmap_map_extent(tp, ip, &del);
|
xfs_bmap_map_extent(tp, ip, &del);
|
||||||
if (error)
|
|
||||||
goto out_cancel;
|
|
||||||
|
|
||||||
/* Charge this new data fork mapping to the on-disk quota. */
|
/* Charge this new data fork mapping to the on-disk quota. */
|
||||||
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_DELBCOUNT,
|
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_DELBCOUNT,
|
||||||
|
@ -1068,9 +1066,7 @@ xfs_reflink_remap_extent(
|
||||||
xfs_refcount_increase_extent(tp, &uirec);
|
xfs_refcount_increase_extent(tp, &uirec);
|
||||||
|
|
||||||
/* Map the new blocks into the data fork. */
|
/* Map the new blocks into the data fork. */
|
||||||
error = xfs_bmap_map_extent(tp, ip, &uirec);
|
xfs_bmap_map_extent(tp, ip, &uirec);
|
||||||
if (error)
|
|
||||||
goto out_cancel;
|
|
||||||
|
|
||||||
/* Update quota accounting. */
|
/* Update quota accounting. */
|
||||||
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT,
|
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT,
|
||||||
|
|
Loading…
Reference in a new issue