diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-10-18 10:19:41 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-10-19 08:33:40 -0700 |
commit | 5b1d0ae9753f0654ab56c1e06155b3abf2919d71 (patch) | |
tree | 487e05a96d9401450c1005eafc4ded3ac8a03530 /fs/xfs/scrub | |
parent | e94b53ff699c2674a9ec083342a5254866210ade (diff) | |
download | linux-stable-5b1d0ae9753f0654ab56c1e06155b3abf2919d71.tar.gz linux-stable-5b1d0ae9753f0654ab56c1e06155b3abf2919d71.tar.bz2 linux-stable-5b1d0ae9753f0654ab56c1e06155b3abf2919d71.zip |
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>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/rtsummary.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/scrub/rtsummary.c b/fs/xfs/scrub/rtsummary.c index ec17385fe4b0..cc5ae050dfb2 100644 --- a/fs/xfs/scrub/rtsummary.c +++ b/fs/xfs/scrub/rtsummary.c @@ -193,7 +193,6 @@ xchk_rtsum_compare( .tp = sc->tp, }; struct xfs_mount *mp = sc->mp; - struct xfs_buf *bp; struct xfs_bmbt_irec map; xfs_fileoff_t off; xchk_rtsumoff_t sumoff = 0; @@ -221,7 +220,7 @@ xchk_rtsum_compare( } /* Read a block's worth of ondisk rtsummary file. */ - error = xfs_rtbuf_get(&args, off, 1, &bp); + error = xfs_rtsummary_read_buf(&args, off); if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, off, &error)) return error; @@ -232,7 +231,7 @@ xchk_rtsum_compare( return error; } - ondisk_info = xfs_rsumblock_infoptr(bp, 0); + ondisk_info = xfs_rsumblock_infoptr(args.sumbp, 0); if (memcmp(ondisk_info, sc->buf, mp->m_blockwsize << XFS_WORDLOG) != 0) xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, off); |