From: majianpeng <majianpeng@xxxxxxxxx> If there are no unacked bad blocks, then there is no point searching for them to acknowledge them. Signed-off-by: majianpeng <majianpeng@xxxxxxxxx> Signed-off-by: NeilBrown <neilb@xxxxxxx> --- drivers/md/md.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index e9913bf..3b6f4d0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8021,7 +8021,7 @@ void md_ack_all_badblocks(struct badblocks *bb) return; write_seqlock_irq(&bb->lock); - if (bb->changed == 0) { + if (bb->changed == 0 && bb->unacked_exist) { u64 *p = bb->page; int i; for (i = 0; i < bb->count ; i++) { -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html