summaryrefslogtreecommitdiff
path: root/lib/lockref.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2021-06-08 09:19:22 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-06-08 09:19:22 -0700
commit9ba0889e2272294bfbb5589b1b180ad2e782b2a4 (patch)
tree5ba752d1575c0acea02abb8a55c741f130ac5ee1 /lib/lockref.c
parentc3eabd365034185840fdd26df21cdb03523f7e2b (diff)
downloadlinux-9ba0889e2272294bfbb5589b1b180ad2e782b2a4.tar.gz
linux-9ba0889e2272294bfbb5589b1b180ad2e782b2a4.tar.bz2
linux-9ba0889e2272294bfbb5589b1b180ad2e782b2a4.zip
xfs: drop the AGI being passed to xfs_check_agi_freecount
From: Dave Chinner <dchinner@redhat.com> Stephen Rothwell reported this compiler warning from linux-next: fs/xfs/libxfs/xfs_ialloc.c: In function 'xfs_difree_finobt': fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable 'agi' [-Wunused-variable] 2032 | struct xfs_agi *agi = agbp->b_addr; Which is fallout from agno -> perag conversions that were done in this function. xfs_check_agi_freecount() is the only user of "agi" in xfs_difree_finobt() now, and it only uses the agi to get the current free inode count. We hold that in the perag structure, so there's not need to directly reference the raw AGI to get this information. The btree cursor being passed to xfs_check_agi_freecount() has a reference to the perag being operated on, so use that directly in xfs_check_agi_freecount() rather than passing an AGI. Fixes: 7b13c5155182 ("xfs: use perag for ialloc btree cursors") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'lib/lockref.c')
0 files changed, 0 insertions, 0 deletions