mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: refactor btree cursor allocation function
Refactor btree allocation to a common helper. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
69724d920e
commit
56370ea6e5
6 changed files with 21 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue