diff options
author | Suzanne Wood <suzannew@cs.pdx.edu> | 2005-11-09 00:39:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:37 -0500 |
commit | d6065f7bf8bec170c9c56524a250093ce73ca5d9 (patch) | |
tree | 336c7db10aa8cee48386171e3de7569fca01dcfd /drivers/md/raid5.c | |
parent | 9d88883e68f404d5581bd391713ceef470ea53a9 (diff) |
[PATCH] md: provide proper rcu_dereference / rcu_assign_pointer annotations in md
Acked-by: <paulmck@us.ibm.com>
Signed-off-by: Suzanne Wood <suzannew@cs.pdx.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ce154553aca5..061d265ed94e 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1374,7 +1374,7 @@ static void handle_stripe(struct stripe_head *sh) | |||
1374 | bi->bi_end_io = raid5_end_read_request; | 1374 | bi->bi_end_io = raid5_end_read_request; |
1375 | 1375 | ||
1376 | rcu_read_lock(); | 1376 | rcu_read_lock(); |
1377 | rdev = conf->disks[i].rdev; | 1377 | rdev = rcu_dereference(conf->disks[i].rdev); |
1378 | if (rdev && rdev->faulty) | 1378 | if (rdev && rdev->faulty) |
1379 | rdev = NULL; | 1379 | rdev = NULL; |
1380 | if (rdev) | 1380 | if (rdev) |
@@ -1448,7 +1448,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
1448 | 1448 | ||
1449 | rcu_read_lock(); | 1449 | rcu_read_lock(); |
1450 | for (i=0; i<mddev->raid_disks; i++) { | 1450 | for (i=0; i<mddev->raid_disks; i++) { |
1451 | mdk_rdev_t *rdev = conf->disks[i].rdev; | 1451 | mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); |
1452 | if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { | 1452 | if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { |
1453 | request_queue_t *r_queue = bdev_get_queue(rdev->bdev); | 1453 | request_queue_t *r_queue = bdev_get_queue(rdev->bdev); |
1454 | 1454 | ||
@@ -1493,7 +1493,7 @@ static int raid5_issue_flush(request_queue_t *q, struct gendisk *disk, | |||
1493 | 1493 | ||
1494 | rcu_read_lock(); | 1494 | rcu_read_lock(); |
1495 | for (i=0; i<mddev->raid_disks && ret == 0; i++) { | 1495 | for (i=0; i<mddev->raid_disks && ret == 0; i++) { |
1496 | mdk_rdev_t *rdev = conf->disks[i].rdev; | 1496 | mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); |
1497 | if (rdev && !rdev->faulty) { | 1497 | if (rdev && !rdev->faulty) { |
1498 | struct block_device *bdev = rdev->bdev; | 1498 | struct block_device *bdev = rdev->bdev; |
1499 | request_queue_t *r_queue = bdev_get_queue(bdev); | 1499 | request_queue_t *r_queue = bdev_get_queue(bdev); |
@@ -2165,7 +2165,7 @@ static int raid5_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
2165 | found = 1; | 2165 | found = 1; |
2166 | if (rdev->saved_raid_disk != disk) | 2166 | if (rdev->saved_raid_disk != disk) |
2167 | conf->fullsync = 1; | 2167 | conf->fullsync = 1; |
2168 | p->rdev = rdev; | 2168 | rcu_assign_pointer(p->rdev, rdev); |
2169 | break; | 2169 | break; |
2170 | } | 2170 | } |
2171 | print_raid5_conf(conf); | 2171 | print_raid5_conf(conf); |