diff options
Diffstat (limited to 'init/do_mounts_md.c')
| -rw-r--r-- | init/do_mounts_md.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index d6da5cdd3c3..8cb6db54285 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -1,5 +1,16 @@ +/* + * Many of the syscalls used in this file expect some of the arguments + * to be __user pointers not __kernel pointers. To limit the sparse + * noise, turn off sparse checking for this file. + */ +#ifdef __CHECKER__ +#undef __CHECKER__ +#warning "Sparse checking disabled for this file" +#endif + #include <linux/delay.h> -#include <linux/raid/md.h> +#include <linux/raid/md_u.h> +#include <linux/raid/md_p.h> #include "do_mounts.h" @@ -112,8 +123,6 @@ static int __init md_setup(char *str) return 1; } -#define MdpMinorShift 6 - static void __init md_setup_drive(void) { int minor, i, ent, partitioned; @@ -271,7 +280,7 @@ static int __init raid_setup(char *str) __setup("raid=", raid_setup); __setup("md=", md_setup); -static void autodetect_raid(void) +static void __init autodetect_raid(void) { int fd; @@ -281,8 +290,9 @@ static void autodetect_raid(void) */ printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); - while (driver_probe_done() < 0) - msleep(100); + + wait_for_device_probe(); + fd = sys_open("/dev/md0", 0, 0); if (fd >= 0) { sys_ioctl(fd, RAID_AUTORUN, raid_autopart); |
