]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: simplify xfs_rtbuf_get calling conventions
authorDarrick J. Wong <djwong@kernel.org>
Thu, 15 Feb 2024 08:27:52 +0000 (09:27 +0100)
committerCarlos Maiolino <cem@kernel.org>
Thu, 15 Feb 2024 11:56:43 +0000 (12:56 +0100)
commitae39121873ae8adedffd065a126b389d59cae10b
treeccb2d52f0e0a94f0fb0a5aa1b147158e1964053d
parent52273f22c90c52b79675e34a2546db43f069fc92
xfs: simplify xfs_rtbuf_get calling conventions

Source kernel commit: 5b1d0ae9753f0654ab56c1e06155b3abf2919d71

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>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_rtbitmap.c
libxfs/xfs_rtbitmap.h