aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 5ebfb4d79901..bb3e4b1cb773 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -282,7 +282,8 @@ static mddev_t * mddev_find(dev_t unit)
282 kfree(new); 282 kfree(new);
283 return NULL; 283 return NULL;
284 } 284 }
285 set_bit(QUEUE_FLAG_CLUSTER, &new->queue->queue_flags); 285 /* Can be unlocked because the queue is new: no concurrency */
286 queue_flag_set_unlocked(QUEUE_FLAG_CLUSTER, new->queue);
286 287
287 blk_queue_make_request(new->queue, md_fail_request); 288 blk_queue_make_request(new->queue, md_fail_request);
288 289
@@ -731,9 +732,9 @@ static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version
731 else 732 else
732 rdev->desc_nr = sb->this_disk.number; 733 rdev->desc_nr = sb->this_disk.number;
733 734
734 if (refdev == 0) 735 if (!refdev) {
735 ret = 1; 736 ret = 1;
736 else { 737 } else {
737 __u64 ev1, ev2; 738 __u64 ev1, ev2;
738 mdp_super_t *refsb = (mdp_super_t*)page_address(refdev->sb_page); 739 mdp_super_t *refsb = (mdp_super_t*)page_address(refdev->sb_page);
739 if (!uuid_equal(refsb, sb)) { 740 if (!uuid_equal(refsb, sb)) {
@@ -1116,9 +1117,9 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
1116 else 1117 else
1117 rdev->desc_nr = le32_to_cpu(sb->dev_number); 1118 rdev->desc_nr = le32_to_cpu(sb->dev_number);
1118 1119
1119 if (refdev == 0) 1120 if (!refdev) {
1120 ret = 1; 1121 ret = 1;
1121 else { 1122 } else {
1122 __u64 ev1, ev2; 1123 __u64 ev1, ev2;
1123 struct mdp_superblock_1 *refsb = 1124 struct mdp_superblock_1 *refsb =
1124 (struct mdp_superblock_1*)page_address(refdev->sb_page); 1125 (struct mdp_superblock_1*)page_address(refdev->sb_page);
@@ -5947,13 +5948,9 @@ static struct notifier_block md_notifier = {
5947 5948
5948static void md_geninit(void) 5949static void md_geninit(void)
5949{ 5950{
5950 struct proc_dir_entry *p;
5951
5952 dprintk("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t)); 5951 dprintk("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t));
5953 5952
5954 p = create_proc_entry("mdstat", S_IRUGO, NULL); 5953 proc_create("mdstat", S_IRUGO, NULL, &md_seq_fops);
5955 if (p)
5956 p->proc_fops = &md_seq_fops;
5957} 5954}
5958 5955
5959static int __init md_init(void) 5956static int __init md_init(void)