aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2012-04-02 01:04:19 +1000
committerNeilBrown <neilb@suse.de>2012-04-03 15:37:33 +1000
commita42f9d83b5c05dc6e678a1f0cd9767502c2c58de (patch)
treee1864a59287f1441a4b016938efea5ca30a57df1 /drivers/md
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')
-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 242440831b2..8c420f17860 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
int ok = 1;
for (i = 0 ; i < conf->raid_disks * 2 ; i++)
if (r1_bio->bios[i]->bi_end_io == end_sync_write) {
- struct md_rdev *rdev =
- rcu_dereference(conf->mirrors[i].rdev);
+ struct md_rdev *rdev = conf->mirrors[i].rdev;
ok = rdev_set_badblocks(rdev, sector_nr,
min_bad, 0
) && ok;