Commit ecb178bb2b154a40cfae9fa4c42e62ccfa81ac6b

Authored by majianpeng
Committed by NeilBrown
1 parent d0962936bf

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: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -8021,7 +8021,7 @@
8021 8021 return;
8022 8022 write_seqlock_irq(&bb->lock);
8023 8023  
8024   - if (bb->changed == 0) {
  8024 + if (bb->changed == 0 && bb->unacked_exist) {
8025 8025 u64 *p = bb->page;
8026 8026 int i;
8027 8027 for (i = 0; i < bb->count ; i++) {