diff options
author | Christoph Hellwig <hch@lst.de> | 2024-02-22 12:40:46 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:40:46 -0800 |
commit | 3038fd8129384c64946c17198229ee61f6f2c8e1 (patch) | |
tree | a83e31ad70743b61c71a9af25b4f5cdb423b3ac9 /fs/xfs/libxfs/xfs_ialloc_btree.c | |
parent | 1c8b9fd278c08e16c27a41be484b77383738de1f (diff) | |
download | linux-3038fd8129384c64946c17198229ee61f6f2c8e1.tar.gz linux-3038fd8129384c64946c17198229ee61f6f2c8e1.tar.bz2 linux-3038fd8129384c64946c17198229ee61f6f2c8e1.zip |
xfs: remove xfs_inobt_cur
This helper provides no real advantage over just open code the two
calls in it in the callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 1fe9d83c575e..441c5a7be1e0 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -710,30 +710,6 @@ xfs_inobt_max_size( XFS_INODES_PER_CHUNK); } -/* Read AGI and create inobt cursor. */ -int -xfs_inobt_cur( - struct xfs_perag *pag, - struct xfs_trans *tp, - xfs_btnum_t which, - struct xfs_btree_cur **curpp, - struct xfs_buf **agi_bpp) -{ - struct xfs_btree_cur *cur; - int error; - - ASSERT(*agi_bpp == NULL); - ASSERT(*curpp == NULL); - - error = xfs_ialloc_read_agi(pag, tp, agi_bpp); - if (error) - return error; - - cur = xfs_inobt_init_cursor(pag, tp, *agi_bpp, which); - *curpp = cur; - return 0; -} - static int xfs_inobt_count_blocks( struct xfs_perag *pag, @@ -742,13 +718,14 @@ xfs_inobt_count_blocks( xfs_extlen_t *tree_blocks) { struct xfs_buf *agbp = NULL; - struct xfs_btree_cur *cur = NULL; + struct xfs_btree_cur *cur; int error; - error = xfs_inobt_cur(pag, tp, btnum, &cur, &agbp); + error = xfs_ialloc_read_agi(pag, tp, &agbp); if (error) return error; + cur = xfs_inobt_init_cursor(pag, tp, agbp, btnum); error = xfs_btree_count_blocks(cur, tree_blocks); xfs_btree_del_cursor(cur, error); xfs_trans_brelse(tp, agbp); |