Commit 922f2a7c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jessica Yu

module: mark module_mutex static

Except for two lockdep asserts module_mutex is only used in module.c.
Remove the two asserts given that the functions they are in are not
exported and just called from the module code, and mark module_mutex
static.
Reviewed-by: default avatarMiroslav Benes <mbenes@suse.cz>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
parent 3e355205
...@@ -550,8 +550,6 @@ static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym) ...@@ -550,8 +550,6 @@ static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym)
} }
#endif #endif
extern struct mutex module_mutex;
/* FIXME: It'd be nice to isolate modules during init, too, so they /* FIXME: It'd be nice to isolate modules during init, too, so they
aren't used before they (may) fail. But presently too much code aren't used before they (may) fail. But presently too much code
(IDE & SCSI) require entry into the module during init.*/ (IDE & SCSI) require entry into the module during init.*/
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
* 3) module_addr_min/module_addr_max. * 3) module_addr_min/module_addr_max.
* (delete and add uses RCU list operations). * (delete and add uses RCU list operations).
*/ */
DEFINE_MUTEX(module_mutex); static DEFINE_MUTEX(module_mutex);
static LIST_HEAD(modules); static LIST_HEAD(modules);
/* Work queue for freeing init sections in success case */ /* Work queue for freeing init sections in success case */
......
...@@ -91,8 +91,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, ...@@ -91,8 +91,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
char *secstrings; char *secstrings;
unsigned int i; unsigned int i;
lockdep_assert_held(&module_mutex);
mod->bug_table = NULL; mod->bug_table = NULL;
mod->num_bugs = 0; mod->num_bugs = 0;
...@@ -118,7 +116,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, ...@@ -118,7 +116,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
void module_bug_cleanup(struct module *mod) void module_bug_cleanup(struct module *mod)
{ {
lockdep_assert_held(&module_mutex);
list_del_rcu(&mod->bug_list); list_del_rcu(&mod->bug_list);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment