@@ -1252,14 +1252,14 @@ xfs_alloc_ag_vextent_small(
12521252 if (fbno == NULLAGBLOCK )
12531253 goto out ;
12541254
1255- xfs_extent_busy_reuse (args -> mp , args -> pag , fbno , 1 ,
1255+ xfs_extent_busy_reuse (args -> pag , fbno , 1 ,
12561256 (args -> datatype & XFS_ALLOC_NOBUSY ));
12571257
12581258 if (args -> datatype & XFS_ALLOC_USERDATA ) {
12591259 struct xfs_buf * bp ;
12601260
12611261 error = xfs_trans_get_buf (args -> tp , args -> mp -> m_ddev_targp ,
1262- XFS_AGB_TO_DADDR (args -> mp , args -> agno , fbno ),
1262+ xfs_agbno_to_daddr (args -> pag , fbno ),
12631263 args -> mp -> m_bsize , 0 , & bp );
12641264 if (error )
12651265 goto error ;
@@ -2037,7 +2037,6 @@ int
20372037xfs_free_ag_extent (
20382038 struct xfs_trans * tp ,
20392039 struct xfs_buf * agbp ,
2040- xfs_agnumber_t agno ,
20412040 xfs_agblock_t bno ,
20422041 xfs_extlen_t len ,
20432042 const struct xfs_owner_info * oinfo ,
@@ -2358,19 +2357,19 @@ xfs_free_ag_extent(
23582357 * Update the freespace totals in the ag and superblock.
23592358 */
23602359 error = xfs_alloc_update_counters (tp , agbp , len );
2361- xfs_ag_resv_free_extent (agbp -> b_pag , type , tp , len );
2360+ xfs_ag_resv_free_extent (pag , type , tp , len );
23622361 if (error )
23632362 goto error0 ;
23642363
23652364 XFS_STATS_INC (mp , xs_freex );
23662365 XFS_STATS_ADD (mp , xs_freeb , len );
23672366
2368- trace_xfs_free_extent (mp , agno , bno , len , type , haveleft , haveright );
2367+ trace_xfs_free_extent (pag , bno , len , type , haveleft , haveright );
23692368
23702369 return 0 ;
23712370
23722371 error0 :
2373- trace_xfs_free_extent (mp , agno , bno , len , type , -1 , -1 );
2372+ trace_xfs_free_extent (pag , bno , len , type , -1 , -1 );
23742373 if (bno_cur )
23752374 xfs_btree_del_cursor (bno_cur , XFS_BTREE_ERROR );
23762375 if (cnt_cur )
@@ -2934,9 +2933,8 @@ xfs_alloc_fix_freelist(
29342933 * Deferring the free disconnects freeing up the AGFL slot from
29352934 * freeing the block.
29362935 */
2937- error = xfs_free_extent_later (tp ,
2938- XFS_AGB_TO_FSB (mp , args -> agno , bno ), 1 ,
2939- & targs .oinfo , XFS_AG_RESV_AGFL , 0 );
2936+ error = xfs_free_extent_later (tp , xfs_agbno_to_fsb (pag , bno ),
2937+ 1 , & targs .oinfo , XFS_AG_RESV_AGFL , 0 );
29402938 if (error )
29412939 goto out_agbp_relse ;
29422940 }
@@ -3360,7 +3358,7 @@ xfs_read_agf(
33603358 struct xfs_mount * mp = pag -> pag_mount ;
33613359 int error ;
33623360
3363- trace_xfs_read_agf (pag -> pag_mount , pag -> pag_agno );
3361+ trace_xfs_read_agf (pag );
33643362
33653363 error = xfs_trans_read_buf (mp , tp , mp -> m_ddev_targp ,
33663364 XFS_AG_DADDR (mp , pag -> pag_agno , XFS_AGF_DADDR (mp )),
@@ -3391,7 +3389,7 @@ xfs_alloc_read_agf(
33913389 int error ;
33923390 int allocbt_blks ;
33933391
3394- trace_xfs_alloc_read_agf (pag -> pag_mount , pag -> pag_agno );
3392+ trace_xfs_alloc_read_agf (pag );
33953393
33963394 /* We don't support trylock when freeing. */
33973395 ASSERT ((flags & (XFS_ALLOC_FLAG_FREEING | XFS_ALLOC_FLAG_TRYLOCK )) !=
@@ -3595,7 +3593,7 @@ xfs_alloc_vextent_finish(
35953593 goto out_drop_perag ;
35963594 }
35973595
3598- args -> fsbno = XFS_AGB_TO_FSB ( mp , args -> agno , args -> agbno );
3596+ args -> fsbno = xfs_agbno_to_fsb ( args -> pag , args -> agbno );
35993597
36003598 ASSERT (args -> len >= args -> minlen );
36013599 ASSERT (args -> len <= args -> maxlen );
@@ -3616,7 +3614,7 @@ xfs_alloc_vextent_finish(
36163614 if (error )
36173615 goto out_drop_perag ;
36183616
3619- ASSERT (!xfs_extent_busy_search (mp , args -> pag , args -> agbno ,
3617+ ASSERT (!xfs_extent_busy_search (args -> pag , args -> agbno ,
36203618 args -> len ));
36213619 }
36223620
@@ -3647,7 +3645,6 @@ xfs_alloc_vextent_this_ag(
36473645 struct xfs_alloc_arg * args ,
36483646 xfs_agnumber_t agno )
36493647{
3650- struct xfs_mount * mp = args -> mp ;
36513648 xfs_agnumber_t minimum_agno ;
36523649 uint32_t alloc_flags = 0 ;
36533650 int error ;
@@ -3660,8 +3657,8 @@ xfs_alloc_vextent_this_ag(
36603657
36613658 trace_xfs_alloc_vextent_this_ag (args );
36623659
3663- error = xfs_alloc_vextent_check_args (args , XFS_AGB_TO_FSB ( mp , agno , 0 ),
3664- & minimum_agno );
3660+ error = xfs_alloc_vextent_check_args (args ,
3661+ xfs_agbno_to_fsb ( args -> pag , 0 ), & minimum_agno );
36653662 if (error ) {
36663663 if (error == - ENOSPC )
36673664 return 0 ;
@@ -4010,8 +4007,7 @@ __xfs_free_extent(
40104007 goto err_release ;
40114008 }
40124009
4013- error = xfs_free_ag_extent (tp , agbp , pag -> pag_agno , agbno , len , oinfo ,
4014- type );
4010+ error = xfs_free_ag_extent (tp , agbp , agbno , len , oinfo , type );
40154011 if (error )
40164012 goto err_release ;
40174013
0 commit comments