Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jessica Yu <jeyu@kernel.org>

authored by

Christoph Hellwig and committed by
Jessica Yu
922f2a7c 3e355205

+1 -6
-2
include/linux/module.h
··· 550 550 } 551 551 #endif 552 552 553 - extern struct mutex module_mutex; 554 - 555 553 /* FIXME: It'd be nice to isolate modules during init, too, so they 556 554 aren't used before they (may) fail. But presently too much code 557 555 (IDE & SCSI) require entry into the module during init.*/
+1 -1
kernel/module.c
··· 87 87 * 3) module_addr_min/module_addr_max. 88 88 * (delete and add uses RCU list operations). 89 89 */ 90 - DEFINE_MUTEX(module_mutex); 90 + static DEFINE_MUTEX(module_mutex); 91 91 static LIST_HEAD(modules); 92 92 93 93 /* Work queue for freeing init sections in success case */
-3
lib/bug.c
··· 91 91 char *secstrings; 92 92 unsigned int i; 93 93 94 - lockdep_assert_held(&module_mutex); 95 - 96 94 mod->bug_table = NULL; 97 95 mod->num_bugs = 0; 98 96 ··· 116 118 117 119 void module_bug_cleanup(struct module *mod) 118 120 { 119 - lockdep_assert_held(&module_mutex); 120 121 list_del_rcu(&mod->bug_list); 121 122 } 122 123