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]>
---
fs/xfs/scrub/repair.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index a02ec8fbc8ac..032de115e373 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -533,14 +533,12 @@ xrep_reap_block(
{
struct xfs_btree_cur *cur;
struct xfs_buf *agf_bp = NULL;
- xfs_agnumber_t agno;
xfs_agblock_t agbno;
bool has_other_rmap;
int error;
- agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
- ASSERT(agno == sc->sa.pag->pag_agno);
+ ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno);
/*
* If we are repairing per-inode metadata, we need to read in the AGF
--
2.25.1
On Wed, Jul 13, 2022 at 09:43:00AM +0800, sunliming wrote:
> 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]>
> ---
> fs/xfs/scrub/repair.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
> index a02ec8fbc8ac..032de115e373 100644
> --- a/fs/xfs/scrub/repair.c
> +++ b/fs/xfs/scrub/repair.c
> @@ -533,14 +533,12 @@ xrep_reap_block(
> {
> struct xfs_btree_cur *cur;
> struct xfs_buf *agf_bp = NULL;
> - xfs_agnumber_t agno;
> xfs_agblock_t agbno;
> bool has_other_rmap;
> int error;
>
> - agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
> agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
> - ASSERT(agno == sc->sa.pag->pag_agno);
> + ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno);
Much better, thank you.
Reviewed-by: Darrick J. Wong <[email protected]>
--D
>
> /*
> * If we are repairing per-inode metadata, we need to read in the AGF
> --
> 2.25.1
>
On Tue, Jul 19, 2022 at 09:54:42AM +0800, sunliming wrote:
> 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]>
Ah, right, I did forget to push it in last week's batch, sorry about
that. It'll be in Thursday's posting, thank you for the reminder.
--D
> ---
> fs/xfs/scrub/repair.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
> index a02ec8fbc8ac..032de115e373 100644
> --- a/fs/xfs/scrub/repair.c
> +++ b/fs/xfs/scrub/repair.c
> @@ -533,14 +533,12 @@ xrep_reap_block(
> {
> struct xfs_btree_cur *cur;
> struct xfs_buf *agf_bp = NULL;
> - xfs_agnumber_t agno;
> xfs_agblock_t agbno;
> bool has_other_rmap;
> int error;
>
> - agno = XFS_FSB_TO_AGNO(sc->mp, fsbno);
> agbno = XFS_FSB_TO_AGBNO(sc->mp, fsbno);
> - ASSERT(agno == sc->sa.pag->pag_agno);
> + ASSERT(XFS_FSB_TO_AGNO(sc->mp, fsbno) == sc->sa.pag->pag_agno);
>
> /*
> * If we are repairing per-inode metadata, we need to read in the AGF
> --
> 2.25.1
>