linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/raid1:using else-if instead if.
@ 2012-04-01  2:29 majianpeng
  2012-04-02  0:03 ` H. Peter Anvin
  0 siblings, 1 reply; 4+ messages in thread
From: majianpeng @ 2012-04-01  2:29 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

From 798f3fce3d077db049a44d0d2434261c937796e9 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Sun, 1 Apr 2012 10:23:56 +0800
Subject: [PATCH] md/raid1:using else-if instead if.


Signed-off-by: majianpeng <majianpeng@gmail.com>
---
 drivers/md/raid1.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 4a40a20..a9de970 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2024,8 +2024,7 @@ static void handle_sync_write_finished(struct r1conf *conf, struct r1bio *r1_bio
 		if (test_bit(BIO_UPTODATE, &bio->bi_flags) &&
 		    test_bit(R1BIO_MadeGood, &r1_bio->state)) {
 			rdev_clear_badblocks(rdev, r1_bio->sector, s);
-		}
-		if (!test_bit(BIO_UPTODATE, &bio->bi_flags) &&
+		} else if (!test_bit(BIO_UPTODATE, &bio->bi_flags) &&
 		    test_bit(R1BIO_WriteError, &r1_bio->state)) {
 			if (!rdev_set_badblocks(rdev, r1_bio->sector, s, 0))
 				md_error(conf->mddev, rdev);
-- 
1.7.5.4

 				
--------------
majianpeng
2012-04-01


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-02  2:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01  2:29 [PATCH] md/raid1:using else-if instead if majianpeng
2012-04-02  0:03 ` H. Peter Anvin
2012-04-02  1:58   ` NeilBrown
2012-04-02  2:11     ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).