From: Andrew Morton It has 80 callsites for a total of 2613 bytes. Cc: Arnaldo Carvalho de Melo Signed-off-by: Andrew Morton --- include/linux/module.h | 12 ++++-------- kernel/module.c | 11 +++++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff -puN include/linux/module.h~uninline-module_put include/linux/module.h --- a/include/linux/module.h~uninline-module_put +++ a/include/linux/module.h @@ -410,16 +410,12 @@ static inline int try_module_get(struct return ret; } +void __module_put(struct module *module); + static inline void module_put(struct module *module) { - if (module) { - unsigned int cpu = get_cpu(); - local_dec(&module->ref[cpu].count); - /* Maybe they're waiting for us to drop reference? */ - if (unlikely(!module_is_live(module))) - wake_up_process(module->waiter); - put_cpu(); - } + if (module) + __module_put(module); } #else /*!CONFIG_MODULE_UNLOAD*/ diff -puN kernel/module.c~uninline-module_put kernel/module.c --- a/kernel/module.c~uninline-module_put +++ a/kernel/module.c @@ -765,6 +765,17 @@ void __symbol_put(const char *symbol) } EXPORT_SYMBOL(__symbol_put); +void __module_put(struct module *module) +{ + unsigned int cpu = get_cpu(); + local_dec(&module->ref[cpu].count); + /* Maybe they're waiting for us to drop reference? */ + if (unlikely(!module_is_live(module))) + wake_up_process(module->waiter); + put_cpu(); +} +EXPORT_SYMBOL(__module_put); + void symbol_put_addr(void *addr) { struct module *modaddr; _