summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_ialloc_btree.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-03 20:19:35 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-11-05 13:38:44 -0800
commite0b5b97dde8e4737d06cb5888abd88373abc22df (patch)
tree2e3bc144a4a8a44bd5b31281a9758b3e83ac1371 /fs/xfs/libxfs/xfs_ialloc_btree.c
parentceaa0bd773e2d6d5726d6535f605ecd6b26d2fcc (diff)
downloadlinux-e0b5b97dde8e4737d06cb5888abd88373abc22df.tar.gz
linux-e0b5b97dde8e4737d06cb5888abd88373abc22df.tar.bz2
linux-e0b5b97dde8e4737d06cb5888abd88373abc22df.zip
xfs: move the min and max group block numbers to xfs_group
Move the min and max agblock numbers to the generic xfs_group structure so that we can start building validators for extents within an rtgroup. While we're at it, use check_add_overflow for the extent length computation because that has much better overflow checking. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc_btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c
index 4c28deb3e988..9b34896dd1a3 100644
--- a/fs/xfs/libxfs/xfs_ialloc_btree.c
+++ b/fs/xfs/libxfs/xfs_ialloc_btree.c
@@ -717,7 +717,7 @@ xfs_inobt_max_size(
struct xfs_perag *pag)
{
struct xfs_mount *mp = pag_mount(pag);
- xfs_agblock_t agblocks = pag->block_count;
+ xfs_agblock_t agblocks = pag_group(pag)->xg_block_count;
/* Bail out if we're uninitialized, which can happen in mkfs. */
if (M_IGEO(mp)->inobt_mxr[0] == 0)