diff options
| author | Darrick J. Wong <[email protected]> | 2021-09-16 19:25:32 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2021-10-19 18:45:15 +0000 |
| commit | 56370ea6e5fe3e3d6e1ca2da58f95fb0d5e1779f (patch) | |
| tree | 451401b83adf0d7f33a79fd96d791169b3fe2ee2 /fs/xfs/libxfs/xfs_ialloc_btree.c | |
| parent | xfs: rearrange xfs_btree_cur fields for better packing (diff) | |
| download | kernel-56370ea6e5fe3e3d6e1ca2da58f95fb0d5e1779f.tar.gz kernel-56370ea6e5fe3e3d6e1ca2da58f95fb0d5e1779f.zip | |
xfs: refactor btree cursor allocation function
Refactor btree allocation to a common helper.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Chandan Babu R <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 10736b89b679..c8fea6a464d5 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -432,10 +432,7 @@ xfs_inobt_init_common( { struct xfs_btree_cur *cur; - 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 = xfs_btree_alloc_cursor(mp, tp, btnum); if (btnum == XFS_BTNUM_INO) { cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_ibt_2); cur->bc_ops = &xfs_inobt_ops; |
