diff options
author | Christoph Hellwig <hch@lst.de> | 2024-02-22 21:40:51 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:40:51 +0100 |
commit | ec793e690f801d97a7ae2a0d429fea1fee4d44aa (patch) | |
tree | 84a9299e3f64721debd132b53a5ea0b324a5d219 /fs/xfs/libxfs/xfs_alloc.c | |
parent | xfs: pass a 'bool is_finobt' to xfs_inobt_insert (diff) | |
download | linux-ec793e690f801d97a7ae2a0d429fea1fee4d44aa.tar.xz linux-ec793e690f801d97a7ae2a0d429fea1fee4d44aa.zip |
xfs: remove xfs_btnum_t
The last checks for bc_btnum can be replaced with helpers that check
the btree ops. This allows adding new btrees to XFS without having
to update a global enum.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: complete the ops predicates]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 2b74aded4a2c..9da52e92172a 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -918,7 +918,7 @@ xfs_alloc_cur_check( bool busy; unsigned busy_gen = 0; bool deactivate = false; - bool isbnobt = cur->bc_btnum == XFS_BTNUM_BNO; + bool isbnobt = xfs_btree_is_bno(cur->bc_ops); *new = 0; @@ -4026,7 +4026,7 @@ xfs_alloc_query_range( union xfs_btree_irec high_brec = { .a = *high_rec }; struct xfs_alloc_query_range_info query = { .priv = priv, .fn = fn }; - ASSERT(cur->bc_btnum == XFS_BTNUM_BNO); + ASSERT(xfs_btree_is_bno(cur->bc_ops)); return xfs_btree_query_range(cur, &low_brec, &high_brec, xfs_alloc_query_range_helper, &query); } @@ -4040,7 +4040,7 @@ xfs_alloc_query_all( { struct xfs_alloc_query_range_info query; - ASSERT(cur->bc_btnum == XFS_BTNUM_BNO); + ASSERT(xfs_btree_is_bno(cur->bc_ops)); query.priv = priv; query.fn = fn; return xfs_btree_query_all(cur, xfs_alloc_query_range_helper, &query); |