]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: get rid of xfs_ag_resv_rmapbt_alloc
authorLong Li <leo.lilong@huawei.com>
Wed, 3 Jul 2024 06:42:26 +0000 (14:42 +0800)
committerChandan Babu R <chandanbabu@kernel.org>
Thu, 4 Jul 2024 09:06:13 +0000 (14:36 +0530)
commit49cdc4e834e46d7c11a91d7adcfa04f56d19efaf
treec422b1bbc488404272972569993858bd15827a09
parentf3f7ae68a4ea23aa9c49530733f1faaa6996b03a
xfs: get rid of xfs_ag_resv_rmapbt_alloc

The pag in xfs_ag_resv_rmapbt_alloc() is already held when the struct
xfs_btree_cur is initialized in xfs_rmapbt_init_cursor(), so there is no
need to get pag again.

On the other hand, in xfs_rmapbt_free_block(), the similar function
xfs_ag_resv_rmapbt_free() was removed in commit 92a005448f6f ("xfs: get
rid of unnecessary xfs_perag_{get,put} pairs"), xfs_ag_resv_rmapbt_alloc()
was left because scrub used it, but now scrub has removed it. Therefore,
we could get rid of xfs_ag_resv_rmapbt_alloc() just like the rmap free
block, make the code cleaner.

Signed-off-by: Long Li <leo.lilong@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/libxfs/xfs_ag_resv.h
fs/xfs/libxfs/xfs_rmap_btree.c