Skip to content

Commit 1a53d3d

Browse files
sunlimingDarrick J. Wong
authored andcommitted
xfs: fix for variable set but not used warning
Fix below kernel warning: fs/xfs/scrub/repair.c:539:19: warning: variable 'agno' set but not used [-Wunused-but-set-variable] Reported-by: kernel test robot <[email protected]> Signed-off-by: sunliming <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 231f91a commit 1a53d3d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/xfs/scrub/repair.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,14 +536,12 @@ xrep_reap_block(
536536
{
537537
struct xfs_btree_cur *cur;
538538
struct xfs_buf *agf_bp = NULL;
539-
xfs_agnumber_t agno;
540539
xfs_agblock_t agbno;
541540
bool has_other_rmap;
542541
int error;
543542

544-
agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
545543
agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
546-
ASSERT(agno == sc->sa.pag->pag_agno);
544+
ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno);
547545

548546
/*
549547
* If we are repairing per-inode metadata, we need to read in the AGF

0 commit comments

Comments
 (0)