Skip to contentSkip to conversation

module.c: fix build breakage when !MODULE_UNLOAD

PATCH New Alexander Beregalov 1 participant 1 message Apr 6, 2009 Linux-next tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 module.c: fix build breakage when !MODULE_UNLOAD

Fix this build error when CONFIG_MODULE_UNLOAD is not set:
kernel/module.c: In function 'sys_init_module':
kernel/module.c:2401: error: 'modules_disabled' undeclared

---

 kernel/module.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/module.c +3 -3
index 274ab43..5fb0ece 100644
@@ -73,6 +73,9 @@ DEFINE_MUTEX(module_mutex);
 EXPORT_SYMBOL_GPL(module_mutex);
 static LIST_HEAD(modules);
 
+/* Block module loading/unloading? */
+int modules_disabled = 0;
+
 /* Waiting for a module to finish initializing? */
 static DECLARE_WAIT_QUEUE_HEAD(module_wq);
 
@@ -782,9 +785,6 @@ static void wait_for_zero_refcount(struct module *mod)
 	mutex_lock(&module_mutex);
 }
 
-/* Block module loading/unloading? */
-int modules_disabled = 0;
-
 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 		unsigned int, flags)
 {