linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* md/raid1:!conf->r1buf_pool is unlikely in function   sync_request.
@ 2012-03-28 11:24 majianpeng
  2012-04-02  1:00 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-03-28 11:24 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

From 7f9446682f64e28106dd52cd12bdf74a19fb4015 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Wed, 28 Mar 2012 19:20:07 +0800
Subject: [PATCH] md/raid1:!conf->r1buf_pool is unlikely in function
 sync_request.


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

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 4a40a20..943b3b3 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2246,7 +2246,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp
 	int good_sectors = RESYNC_SECTORS;
 	int min_bad = 0; /* number of sectors that are bad in all devices */
 
-	if (!conf->r1buf_pool)
+	if (unlikely(!conf->r1buf_pool))
 		if (init_resync(conf))
 			return 0;
 
-- 
1.7.5.4

 				
--------------
majianpeng
2012-03-28


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-28 11:24 md/raid1:!conf->r1buf_pool is unlikely in function sync_request majianpeng
2012-04-02  1:00 ` NeilBrown

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).