diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-04-14 03:27:18 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-04-14 18:17:31 -0400 |
commit | 19e4529ee7345079eeacc8e40cf69a304a64dc23 (patch) | |
tree | 5f08c1803c10178373468e1fd3e24a91092cb7a1 /kernel/module.c | |
parent | ecfcc53fef3c357574bb6143dce6631e6d56295c (diff) |
modules: Fix up build when CONFIG_MODULE_UNLOAD=n.
Commit 3d43321b7015387cfebbe26436d0e9d299162ea1 ("modules: sysctl to
block module loading") introduces a modules_disabled variable that is
only defined if CONFIG_MODULE_UNLOAD is enabled, despite being used in
other places. This moves it up and fixes up the build.
CC kernel/module.o
kernel/module.c: In function 'sys_init_module':
kernel/module.c:2401: error: 'modules_disabled' undeclared (first use in this function)
kernel/module.c:2401: error: (Each undeclared identifier is reported only once
kernel/module.c:2401: error: for each function it appears in.)
make[1]: *** [kernel/module.o] Error 1
make: *** [kernel/module.o] Error 2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c index eeb3f7b1383..ee7ab612daf 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -71,6 +71,9 @@ | |||
71 | static DEFINE_MUTEX(module_mutex); | 71 | static DEFINE_MUTEX(module_mutex); |
72 | static LIST_HEAD(modules); | 72 | static LIST_HEAD(modules); |
73 | 73 | ||
74 | /* Block module loading/unloading? */ | ||
75 | int modules_disabled = 0; | ||
76 | |||
74 | /* Waiting for a module to finish initializing? */ | 77 | /* Waiting for a module to finish initializing? */ |
75 | static DECLARE_WAIT_QUEUE_HEAD(module_wq); | 78 | static DECLARE_WAIT_QUEUE_HEAD(module_wq); |
76 | 79 | ||
@@ -778,9 +781,6 @@ static void wait_for_zero_refcount(struct module *mod) | |||
778 | mutex_lock(&module_mutex); | 781 | mutex_lock(&module_mutex); |
779 | } | 782 | } |
780 | 783 | ||
781 | /* Block module loading/unloading? */ | ||
782 | int modules_disabled = 0; | ||
783 | |||
784 | SYSCALL_DEFINE2(delete_module, const char __user *, name_user, | 784 | SYSCALL_DEFINE2(delete_module, const char __user *, name_user, |
785 | unsigned int, flags) | 785 | unsigned int, flags) |
786 | { | 786 | { |