aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2012-04-01 11:04:19 -0400
committerNeilBrown <neilb@suse.de>2012-04-03 01:37:33 -0400
commita42f9d83b5c05dc6e678a1f0cd9767502c2c58de (patch)
treee1864a59287f1441a4b016938efea5ca30a57df1 /drivers/md/raid1.c
parent24b961f811a3e790a9b93604d2594bfb6cce4fa4 (diff)
md/raid1:Remove unnecessary rcu_dereference(conf->mirrors[i].rdev).
Because rde->nr_pending > 0,so can not remove this disk. And in any case, we aren't holding rcu_read_lock() Signed-off-by: majianpeng <majianpeng@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 242440831b23..8c420f178603 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2386,8 +2386,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp
2386 int ok = 1; 2386 int ok = 1;
2387 for (i = 0 ; i < conf->raid_disks * 2 ; i++) 2387 for (i = 0 ; i < conf->raid_disks * 2 ; i++)
2388 if (r1_bio->bios[i]->bi_end_io == end_sync_write) { 2388 if (r1_bio->bios[i]->bi_end_io == end_sync_write) {
2389 struct md_rdev *rdev = 2389 struct md_rdev *rdev = conf->mirrors[i].rdev;
2390 rcu_dereference(conf->mirrors[i].rdev);
2391 ok = rdev_set_badblocks(rdev, sector_nr, 2390 ok = rdev_set_badblocks(rdev, sector_nr,
2392 min_bad, 0 2391 min_bad, 0
2393 ) && ok; 2392 ) && ok;