diff options
Diffstat (limited to 'init/do_mounts_md.c')
-rw-r--r-- | init/do_mounts_md.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 2429e1bf8c60..753dc54a6649 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c | |||
@@ -20,7 +20,7 @@ static struct { | |||
20 | int level; | 20 | int level; |
21 | int chunk; | 21 | int chunk; |
22 | char *device_names; | 22 | char *device_names; |
23 | } md_setup_args[MAX_MD_DEVS] __initdata; | 23 | } md_setup_args[256] __initdata; |
24 | 24 | ||
25 | static int md_setup_ents __initdata; | 25 | static int md_setup_ents __initdata; |
26 | 26 | ||
@@ -61,10 +61,6 @@ static int __init md_setup(char *str) | |||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | str1 = str; | 63 | str1 = str; |
64 | if (minor >= MAX_MD_DEVS) { | ||
65 | printk(KERN_WARNING "md: md=%d, Minor device number too high.\n", minor); | ||
66 | return 0; | ||
67 | } | ||
68 | for (ent=0 ; ent< md_setup_ents ; ent++) | 64 | for (ent=0 ; ent< md_setup_ents ; ent++) |
69 | if (md_setup_args[ent].minor == minor && | 65 | if (md_setup_args[ent].minor == minor && |
70 | md_setup_args[ent].partitioned == partitioned) { | 66 | md_setup_args[ent].partitioned == partitioned) { |
@@ -72,7 +68,7 @@ static int __init md_setup(char *str) | |||
72 | "Replacing previous definition.\n", partitioned?"d":"", minor); | 68 | "Replacing previous definition.\n", partitioned?"d":"", minor); |
73 | break; | 69 | break; |
74 | } | 70 | } |
75 | if (ent >= MAX_MD_DEVS) { | 71 | if (ent >= ARRAY_SIZE(md_setup_args)) { |
76 | printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); | 72 | printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); |
77 | return 0; | 73 | return 0; |
78 | } | 74 | } |