diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:33:18 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:33:18 -0800 |
commit | 056d22c87132cf4968f5e702116439bea9795930 (patch) | |
tree | 9d90f676bc6429d6c370b3e1f98e1cee818d3eaf /fs/xfs/libxfs/xfs_ialloc_btree.c | |
parent | 2ed0b2c7f33159825af1a1a83face66edb52348a (diff) | |
download | linux-056d22c87132cf4968f5e702116439bea9795930.tar.gz linux-056d22c87132cf4968f5e702116439bea9795930.tar.bz2 linux-056d22c87132cf4968f5e702116439bea9795930.zip |
xfs: set the btree cursor bc_ops in xfs_btree_alloc_cursor
This is a precursor to putting more static data in the btree ops structure.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 42a5e1f227a0..8b705cc62d3d 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -454,14 +454,16 @@ xfs_inobt_init_common( struct xfs_mount *mp = pag->pag_mount; struct xfs_btree_cur *cur; - cur = xfs_btree_alloc_cursor(mp, tp, btnum, - M_IGEO(mp)->inobt_maxlevels, xfs_inobt_cur_cache); if (btnum == XFS_BTNUM_INO) { + cur = xfs_btree_alloc_cursor(mp, tp, btnum, &xfs_inobt_ops, + M_IGEO(mp)->inobt_maxlevels, + xfs_inobt_cur_cache); cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_ibt_2); - cur->bc_ops = &xfs_inobt_ops; } else { + cur = xfs_btree_alloc_cursor(mp, tp, btnum, &xfs_finobt_ops, + M_IGEO(mp)->inobt_maxlevels, + xfs_inobt_cur_cache); cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_fibt_2); - cur->bc_ops = &xfs_finobt_ops; } if (xfs_has_crc(mp)) |