Skip to content

Commit

Permalink
md: Add judgement bb->unacked_exist in function md_ack_all_badblocks().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
majianpeng authored and NeilBrown committed Mar 19, 2012
1 parent d096293 commit ecb178b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit ecb178b

Please sign in to comment.