mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
xfs: remove the agno argument to xfs_free_ag_extent
xfs_free_ag_extent already has a pointer to the pag structure through the agf buffer. Use that instead of passing the redundant argument, and do the same for the tracepoint. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
parent
67ce5ba575
commit
db129fa011
@ -2037,7 +2037,6 @@ int
|
||||
xfs_free_ag_extent(
|
||||
struct xfs_trans *tp,
|
||||
struct xfs_buf *agbp,
|
||||
xfs_agnumber_t agno,
|
||||
xfs_agblock_t bno,
|
||||
xfs_extlen_t len,
|
||||
const struct xfs_owner_info *oinfo,
|
||||
@ -2358,19 +2357,19 @@ xfs_free_ag_extent(
|
||||
* Update the freespace totals in the ag and superblock.
|
||||
*/
|
||||
error = xfs_alloc_update_counters(tp, agbp, len);
|
||||
xfs_ag_resv_free_extent(agbp->b_pag, type, tp, len);
|
||||
xfs_ag_resv_free_extent(pag, type, tp, len);
|
||||
if (error)
|
||||
goto error0;
|
||||
|
||||
XFS_STATS_INC(mp, xs_freex);
|
||||
XFS_STATS_ADD(mp, xs_freeb, len);
|
||||
|
||||
trace_xfs_free_extent(mp, agno, bno, len, type, haveleft, haveright);
|
||||
trace_xfs_free_extent(pag, bno, len, type, haveleft, haveright);
|
||||
|
||||
return 0;
|
||||
|
||||
error0:
|
||||
trace_xfs_free_extent(mp, agno, bno, len, type, -1, -1);
|
||||
trace_xfs_free_extent(pag, bno, len, type, -1, -1);
|
||||
if (bno_cur)
|
||||
xfs_btree_del_cursor(bno_cur, XFS_BTREE_ERROR);
|
||||
if (cnt_cur)
|
||||
@ -4012,8 +4011,7 @@ __xfs_free_extent(
|
||||
goto err_release;
|
||||
}
|
||||
|
||||
error = xfs_free_ag_extent(tp, agbp, pag->pag_agno, agbno, len, oinfo,
|
||||
type);
|
||||
error = xfs_free_ag_extent(tp, agbp, agbno, len, oinfo, type);
|
||||
if (error)
|
||||
goto err_release;
|
||||
|
||||
|
@ -79,9 +79,8 @@ int xfs_alloc_put_freelist(struct xfs_perag *pag, struct xfs_trans *tp,
|
||||
struct xfs_buf *agfbp, struct xfs_buf *agflbp,
|
||||
xfs_agblock_t bno, int btreeblk);
|
||||
int xfs_free_ag_extent(struct xfs_trans *tp, struct xfs_buf *agbp,
|
||||
xfs_agnumber_t agno, xfs_agblock_t bno,
|
||||
xfs_extlen_t len, const struct xfs_owner_info *oinfo,
|
||||
enum xfs_ag_resv_type type);
|
||||
xfs_agblock_t bno, xfs_extlen_t len,
|
||||
const struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
|
||||
|
||||
/*
|
||||
* Compute and fill in value of m_alloc_maxlevels.
|
||||
|
@ -547,8 +547,8 @@ xfs_agfl_free_finish_item(
|
||||
|
||||
error = xfs_alloc_read_agf(xefi->xefi_pag, tp, 0, &agbp);
|
||||
if (!error)
|
||||
error = xfs_free_ag_extent(tp, agbp, xefi->xefi_pag->pag_agno,
|
||||
agbno, 1, &oinfo, XFS_AG_RESV_AGFL);
|
||||
error = xfs_free_ag_extent(tp, agbp, agbno, 1, &oinfo,
|
||||
XFS_AG_RESV_AGFL);
|
||||
|
||||
xfs_efd_add_extent(efdp, xefi);
|
||||
xfs_extent_free_cancel_item(&xefi->xefi_list);
|
||||
|
@ -1758,10 +1758,9 @@ DEFINE_AGF_EVENT(xfs_agf);
|
||||
DEFINE_AGF_EVENT(xfs_agfl_reset);
|
||||
|
||||
TRACE_EVENT(xfs_free_extent,
|
||||
TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
|
||||
xfs_extlen_t len, enum xfs_ag_resv_type resv, int haveleft,
|
||||
int haveright),
|
||||
TP_ARGS(mp, agno, agbno, len, resv, haveleft, haveright),
|
||||
TP_PROTO(struct xfs_perag *pag, xfs_agblock_t agbno, xfs_extlen_t len,
|
||||
enum xfs_ag_resv_type resv, int haveleft, int haveright),
|
||||
TP_ARGS(pag, agbno, len, resv, haveleft, haveright),
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
__field(xfs_agnumber_t, agno)
|
||||
@ -1772,8 +1771,8 @@ TRACE_EVENT(xfs_free_extent,
|
||||
__field(int, haveright)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->dev = mp->m_super->s_dev;
|
||||
__entry->agno = agno;
|
||||
__entry->dev = pag->pag_mount->m_super->s_dev;
|
||||
__entry->agno = pag->pag_agno;
|
||||
__entry->agbno = agbno;
|
||||
__entry->len = len;
|
||||
__entry->resv = resv;
|
||||
|
Loading…
Reference in New Issue
Block a user