xfs: simplify xfs_rtbuf_get calling conventions
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 Oct 2023 17:19:41 +0000 (10:19 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 19 Oct 2023 15:33:40 +0000 (08:33 -0700)
commit5b1d0ae9753f0654ab56c1e06155b3abf2919d71
tree487e05a96d9401450c1005eafc4ded3ac8a03530
parente94b53ff699c2674a9ec083342a5254866210ade
xfs: simplify xfs_rtbuf_get calling conventions

Now that xfs_rtalloc_args holds references to the last-read bitmap and
summary blocks, we don't need to pass the buffer pointer out of
xfs_rtbuf_get.

Callers no longer have to xfs_trans_brelse on their own, though they are
required to call xfs_rtbuf_cache_relse before the xfs_rtalloc_args goes
out of scope.

While we're at it, create some trivial helpers so that we don't have to
remember if "0" means "bitmap" and "1" means "summary".

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/libxfs/xfs_rtbitmap.h
fs/xfs/scrub/rtsummary.c