xfs: remove bogus assertion when online repair isn't enabled
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 8 Jan 2020 00:11:30 +0000 (16:11 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Jan 2020 18:55:19 +0000 (10:55 -0800)
We don't need to assert on !REPAIR in the stub version of
xrep_calc_ag_resblks that is called when online repair hasn't been
compiled into the kernel because none of the repair code will ever run.

Reported-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/repair.h

index 60c61d7..c342240 100644 (file)
@@ -75,7 +75,6 @@ static inline xfs_extlen_t
 xrep_calc_ag_resblks(
        struct xfs_scrub        *sc)
 {
-       ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR));
        return 0;
 }