Thread (4 messages) 4 messages, 3 authors, 2012-06-27

md:Fix a bug in function badblocks_show().

From: majianpeng <hidden>
Date: 2012-03-08 06:46:52
Subsystem: software raid (multiple disks) support, the rest · Maintainers: Song Liu, Yu Kuai, Linus Torvalds

From 58d2ba381eee4b732fca99a7311b1dcf589f57c3 Mon Sep 17 00:00:00 2001
From: majianpeng <redacted>
Date: Thu, 8 Mar 2012 14:37:00 +0800
Subject: [PATCH] md:Fix a bug in function badblocks_show().

If unack==0, it will show all bad blocks include unacknowledged-bad-blocks.

Signed-off-by: majianpeng <redacted>
---
 drivers/md/md.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ce88755..3f1b6e5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8091,7 +8091,7 @@ retry:
 		int ack = BB_ACK(p[i]);
 		i++;
 
-		if (unack && ack)
+		if ((unack ^ ack) == 0)
 			continue;
 
 		len += snprintf(page+len, PAGE_SIZE-len, "%llu %u\n",
-- 
1.7.5.4

 				
--------------
majianpeng
2012-03-08
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help