ubi: fastmap: Fix inverted logic in seen selfcheck
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 23 Oct 2019 09:58:12 +0000 (11:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:47 +0000 (04:35 -0800)
commit6f362620793be78637d18c862d960248cad17eb2
treea998d5fec9e6385e0367ae431733b6a006f5798a
parentc6d07f6e50e47d439fd25fa0ae5382588636c38b
ubi: fastmap: Fix inverted logic in seen selfcheck

commit ef5aafb6e4e9942a28cd300bdcda21ce6cbaf045 upstream.

set_seen() sets the bit corresponding to the PEB number in the bitmap,
so when self_check_seen() wants to find PEBs that haven't been seen we
have to print the PEBs that have their bit cleared, not the ones which
have it set.

Fixes: 5d71afb00840 ("ubi: Use bitmaps in Fastmap self-check code")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/fastmap.c