aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/raid5.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index ec14ff5b508a..c3e596778618 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4715,6 +4715,18 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4715 conf = kzalloc(sizeof(raid5_conf_t), GFP_KERNEL); 4715 conf = kzalloc(sizeof(raid5_conf_t), GFP_KERNEL);
4716 if (conf == NULL) 4716 if (conf == NULL)
4717 goto abort; 4717 goto abort;
4718 spin_lock_init(&conf->device_lock);
4719 init_waitqueue_head(&conf->wait_for_stripe);
4720 init_waitqueue_head(&conf->wait_for_overlap);
4721 INIT_LIST_HEAD(&conf->handle_list);
4722 INIT_LIST_HEAD(&conf->hold_list);
4723 INIT_LIST_HEAD(&conf->delayed_list);
4724 INIT_LIST_HEAD(&conf->bitmap_list);
4725 INIT_LIST_HEAD(&conf->inactive_list);
4726 atomic_set(&conf->active_stripes, 0);
4727 atomic_set(&conf->preread_active_stripes, 0);
4728 atomic_set(&conf->active_aligned_reads, 0);
4729 conf->bypass_threshold = BYPASS_THRESHOLD;
4718 4730
4719 conf->raid_disks = mddev->raid_disks; 4731 conf->raid_disks = mddev->raid_disks;
4720 conf->scribble_len = scribble_len(conf->raid_disks); 4732 conf->scribble_len = scribble_len(conf->raid_disks);
@@ -4737,19 +4749,6 @@ static raid5_conf_t *setup_conf(mddev_t *mddev)
4737 if (raid5_alloc_percpu(conf) != 0) 4749 if (raid5_alloc_percpu(conf) != 0)
4738 goto abort; 4750 goto abort;
4739 4751
4740 spin_lock_init(&conf->device_lock);
4741 init_waitqueue_head(&conf->wait_for_stripe);
4742 init_waitqueue_head(&conf->wait_for_overlap);
4743 INIT_LIST_HEAD(&conf->handle_list);
4744 INIT_LIST_HEAD(&conf->hold_list);
4745 INIT_LIST_HEAD(&conf->delayed_list);
4746 INIT_LIST_HEAD(&conf->bitmap_list);
4747 INIT_LIST_HEAD(&conf->inactive_list);
4748 atomic_set(&conf->active_stripes, 0);
4749 atomic_set(&conf->preread_active_stripes, 0);
4750 atomic_set(&conf->active_aligned_reads, 0);
4751 conf->bypass_threshold = BYPASS_THRESHOLD;
4752
4753 pr_debug("raid5: run(%s) called.\n", mdname(mddev)); 4752 pr_debug("raid5: run(%s) called.\n", mdname(mddev));
4754 4753
4755 list_for_each_entry(rdev, &mddev->disks, same_set) { 4754 list_for_each_entry(rdev, &mddev->disks, same_set) {