From 56370ea6e5fe3e3d6e1ca2da58f95fb0d5e1779f Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 16 Sep 2021 12:25:32 -0700 Subject: xfs: refactor btree cursor allocation function Refactor btree allocation to a common helper. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner --- fs/xfs/libxfs/xfs_refcount_btree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'fs/xfs/libxfs/xfs_refcount_btree.c') diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c b/fs/xfs/libxfs/xfs_refcount_btree.c index 3ea589f15b14..48c45e31d897 100644 --- a/fs/xfs/libxfs/xfs_refcount_btree.c +++ b/fs/xfs/libxfs/xfs_refcount_btree.c @@ -322,10 +322,7 @@ xfs_refcountbt_init_common( ASSERT(pag->pag_agno < mp->m_sb.sb_agcount); - cur = kmem_cache_zalloc(xfs_btree_cur_zone, GFP_NOFS | __GFP_NOFAIL); - cur->bc_tp = tp; - cur->bc_mp = mp; - cur->bc_btnum = XFS_BTNUM_REFC; + cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_REFC); cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_refcbt_2); cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; -- cgit v1.2.3