]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: get rid of xfs_ag_resv_rmapbt_alloc
authorLong Li <leo.lilong@huawei.com>
Wed, 2 Oct 2024 01:23:42 +0000 (18:23 -0700)
committerAndrey Albershteyn <aalbersh@redhat.com>
Fri, 4 Oct 2024 10:42:07 +0000 (12:42 +0200)
commit9ba014e2e6502b8fa0558e3d6d2532c2eff9e896
tree13707129b0c87747e3c9f7f9b7e174e23e4d0c88
parent922a67a8e95771af5ca43288e72e20654d3e27a6
xfs: get rid of xfs_ag_resv_rmapbt_alloc

Source kernel commit: 49cdc4e834e46d7c11a91d7adcfa04f56d19efaf

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>
libxfs/xfs_ag_resv.h
libxfs/xfs_rmap_btree.c