Commit ecb178bb authored by majianpeng's avatar majianpeng Committed by NeilBrown

md: Add judgement bb->unacked_exist in function md_ack_all_badblocks().

If there are no unacked bad blocks, then there is no point searching
for them to acknowledge them.
Signed-off-by: default avatarmajianpeng <majianpeng@gmail.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent d0962936
...@@ -8021,7 +8021,7 @@ void md_ack_all_badblocks(struct badblocks *bb) ...@@ -8021,7 +8021,7 @@ void md_ack_all_badblocks(struct badblocks *bb)
return; return;
write_seqlock_irq(&bb->lock); write_seqlock_irq(&bb->lock);
if (bb->changed == 0) { if (bb->changed == 0 && bb->unacked_exist) {
u64 *p = bb->page; u64 *p = bb->page;
int i; int i;
for (i = 0; i < bb->count ; i++) { for (i = 0; i < bb->count ; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment