diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index baf1f0f5c461..18efadb11cf6 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -70,6 +70,8 @@ | |||
70 | #include <linux/perf_event.h> | 70 | #include <linux/perf_event.h> |
71 | #include <linux/file.h> | 71 | #include <linux/file.h> |
72 | #include <linux/ptrace.h> | 72 | #include <linux/ptrace.h> |
73 | #include <linux/blkdev.h> | ||
74 | #include <linux/elevator.h> | ||
73 | 75 | ||
74 | #include <asm/io.h> | 76 | #include <asm/io.h> |
75 | #include <asm/bugs.h> | 77 | #include <asm/bugs.h> |
@@ -794,6 +796,17 @@ static void __init do_pre_smp_initcalls(void) | |||
794 | do_one_initcall(*fn); | 796 | do_one_initcall(*fn); |
795 | } | 797 | } |
796 | 798 | ||
799 | /* | ||
800 | * This function requests modules which should be loaded by default and is | ||
801 | * called twice right after initrd is mounted and right before init is | ||
802 | * exec'd. If such modules are on either initrd or rootfs, they will be | ||
803 | * loaded before control is passed to userland. | ||
804 | */ | ||
805 | void __init load_default_modules(void) | ||
806 | { | ||
807 | load_default_elevator_module(); | ||
808 | } | ||
809 | |||
797 | static int run_init_process(const char *init_filename) | 810 | static int run_init_process(const char *init_filename) |
798 | { | 811 | { |
799 | argv_init[0] = init_filename; | 812 | argv_init[0] = init_filename; |
@@ -898,4 +911,7 @@ static void __init kernel_init_freeable(void) | |||
898 | * we're essentially up and running. Get rid of the | 911 | * we're essentially up and running. Get rid of the |
899 | * initmem segments and start the user-mode stuff.. | 912 | * initmem segments and start the user-mode stuff.. |
900 | */ | 913 | */ |
914 | |||
915 | /* rootfs is available now, try loading default modules */ | ||
916 | load_default_modules(); | ||
901 | } | 917 | } |