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/raid6main.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/raid6main.c')
-rw-r--r-- | drivers/md/raid6main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c index 775786947701..84f3ee01e4c8 100644 --- a/drivers/md/raid6main.c +++ b/drivers/md/raid6main.c | |||
@@ -1464,7 +1464,7 @@ static void handle_stripe(struct stripe_head *sh) | |||
1464 | bi->bi_end_io = raid6_end_read_request; | 1464 | bi->bi_end_io = raid6_end_read_request; |
1465 | 1465 | ||
1466 | rcu_read_lock(); | 1466 | rcu_read_lock(); |
1467 | rdev = conf->disks[i].rdev; | 1467 | rdev = rcu_dereference(conf->disks[i].rdev); |
1468 | if (rdev && rdev->faulty) | 1468 | if (rdev && rdev->faulty) |
1469 | rdev = NULL; | 1469 | rdev = NULL; |
1470 | if (rdev) | 1470 | if (rdev) |
@@ -1538,7 +1538,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
1538 | 1538 | ||
1539 | rcu_read_lock(); | 1539 | rcu_read_lock(); |
1540 | for (i=0; i<mddev->raid_disks; i++) { | 1540 | for (i=0; i<mddev->raid_disks; i++) { |
1541 | mdk_rdev_t *rdev = conf->disks[i].rdev; | 1541 | mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); |
1542 | if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { | 1542 | if (rdev && !rdev->faulty && atomic_read(&rdev->nr_pending)) { |
1543 | request_queue_t *r_queue = bdev_get_queue(rdev->bdev); | 1543 | request_queue_t *r_queue = bdev_get_queue(rdev->bdev); |
1544 | 1544 | ||
@@ -1583,7 +1583,7 @@ static int raid6_issue_flush(request_queue_t *q, struct gendisk *disk, | |||
1583 | 1583 | ||
1584 | rcu_read_lock(); | 1584 | rcu_read_lock(); |
1585 | for (i=0; i<mddev->raid_disks && ret == 0; i++) { | 1585 | for (i=0; i<mddev->raid_disks && ret == 0; i++) { |
1586 | mdk_rdev_t *rdev = conf->disks[i].rdev; | 1586 | mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); |
1587 | if (rdev && !rdev->faulty) { | 1587 | if (rdev && !rdev->faulty) { |
1588 | struct block_device *bdev = rdev->bdev; | 1588 | struct block_device *bdev = rdev->bdev; |
1589 | request_queue_t *r_queue = bdev_get_queue(bdev); | 1589 | request_queue_t *r_queue = bdev_get_queue(bdev); |
@@ -2154,7 +2154,7 @@ static int raid6_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
2154 | found = 1; | 2154 | found = 1; |
2155 | if (rdev->saved_raid_disk != disk) | 2155 | if (rdev->saved_raid_disk != disk) |
2156 | conf->fullsync = 1; | 2156 | conf->fullsync = 1; |
2157 | p->rdev = rdev; | 2157 | rcu_assign_pointer(p->rdev, rdev); |
2158 | break; | 2158 | break; |
2159 | } | 2159 | } |
2160 | print_raid6_conf(conf); | 2160 | print_raid6_conf(conf); |