diff options
author | majianpeng <majianpeng@gmail.com> | 2012-04-01 17:04:19 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-04-03 07:37:33 +0200 |
commit | a42f9d83b5c05dc6e678a1f0cd9767502c2c58de (patch) | |
tree | e1864a59287f1441a4b016938efea5ca30a57df1 /drivers/md | |
parent | md: Avoid OOPS when reshaping raid1 to raid0 (diff) | |
download | linux-a42f9d83b5c05dc6e678a1f0cd9767502c2c58de.tar.xz linux-a42f9d83b5c05dc6e678a1f0cd9767502c2c58de.zip |
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.c | 3 |
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 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; |