summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authormajianpeng2012-03-19 02:46:42 +0100
committerNeilBrown2012-03-19 02:46:42 +0100
commitecb178bb2b154a40cfae9fa4c42e62ccfa81ac6b (patch)
treea3a6ff71d28069f6eef78a4f24f7f9c385a086a7 /drivers/md
parentmd: fix clearing of the 'changed' flags for the bad blocks list. (diff)
downloadkernel-qcow2-linux-ecb178bb2b154a40cfae9fa4c42e62ccfa81ac6b.tar.gz
kernel-qcow2-linux-ecb178bb2b154a40cfae9fa4c42e62ccfa81ac6b.tar.xz
kernel-qcow2-linux-ecb178bb2b154a40cfae9fa4c42e62ccfa81ac6b.zip
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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 21a90efb13b7..b572e1e386ce 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++) {