Browse Source

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>
majianpeng 13 years ago
parent
commit
ecb178bb2b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/md/md.c

+ 1 - 1
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++) {