diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 5938fa962922..8536ede1e712 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -886,7 +886,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
886 | */ | 886 | */ |
887 | raid10_find_phys(conf, r10_bio); | 887 | raid10_find_phys(conf, r10_bio); |
888 | retry_write: | 888 | retry_write: |
889 | blocked_rdev = 0; | 889 | blocked_rdev = NULL; |
890 | rcu_read_lock(); | 890 | rcu_read_lock(); |
891 | for (i = 0; i < conf->copies; i++) { | 891 | for (i = 0; i < conf->copies; i++) { |
892 | int d = r10_bio->devs[i].devnum; | 892 | int d = r10_bio->devs[i].devnum; |
@@ -2082,6 +2082,9 @@ static int run(mddev_t *mddev) | |||
2082 | goto out_free_conf; | 2082 | goto out_free_conf; |
2083 | } | 2083 | } |
2084 | 2084 | ||
2085 | spin_lock_init(&conf->device_lock); | ||
2086 | mddev->queue->queue_lock = &conf->device_lock; | ||
2087 | |||
2085 | rdev_for_each(rdev, tmp, mddev) { | 2088 | rdev_for_each(rdev, tmp, mddev) { |
2086 | disk_idx = rdev->raid_disk; | 2089 | disk_idx = rdev->raid_disk; |
2087 | if (disk_idx >= mddev->raid_disks | 2090 | if (disk_idx >= mddev->raid_disks |
@@ -2103,7 +2106,6 @@ static int run(mddev_t *mddev) | |||
2103 | 2106 | ||
2104 | disk->head_position = 0; | 2107 | disk->head_position = 0; |
2105 | } | 2108 | } |
2106 | spin_lock_init(&conf->device_lock); | ||
2107 | INIT_LIST_HEAD(&conf->retry_list); | 2109 | INIT_LIST_HEAD(&conf->retry_list); |
2108 | 2110 | ||
2109 | spin_lock_init(&conf->resync_lock); | 2111 | spin_lock_init(&conf->resync_lock); |