diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-01-05 17:45:46 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-03-25 17:08:40 -0700 |
commit | c949ce3a774126dc67fce33e0269835867fb4365 (patch) | |
tree | beb321d3a9d1021df69068130a34a1e90ec23a7a /fs/xfs/libxfs/xfs_alloc_btree.c | |
parent | 7ddff541f1515a0097612f2f998dc8de1cad758c (diff) |
xfs: refactor btree cursor allocation function
Refactor btree allocation to a common helper.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc_btree.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc_btree.c b/fs/xfs/libxfs/xfs_alloc_btree.c index 3cb0557c11cf..cb58d0261ae2 100644 --- a/fs/xfs/libxfs/xfs_alloc_btree.c +++ b/fs/xfs/libxfs/xfs_alloc_btree.c @@ -480,13 +480,7 @@ xfs_allocbt_init_common( ASSERT(btnum == XFS_BTNUM_BNO || btnum == XFS_BTNUM_CNT); - cur = kmem_cache_zalloc(xfs_btree_cur_zone, GFP_NOFS | __GFP_NOFAIL); - - cur->bc_tp = tp; - cur->bc_mp = mp; - cur->bc_btnum = btnum; - cur->bc_blocklog = mp->m_sb.sb_blocklog; - + cur = xfs_btree_alloc_cursor(mp, tp, btnum); if (btnum == XFS_BTNUM_CNT) { cur->bc_ops = &xfs_cntbt_ops; cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_abtc_2); |