md/raid1:!conf->r1buf_pool is unlikely in function sync_request.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 7f9446682f64e28106dd52cd12bdf74a19fb4015 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@xxxxxxxxx>
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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux