diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 21:27:09 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 21:27:09 (GMT) |
commit | d25413efa9536e2f425ea45c7720598035c597bc (patch) | |
tree | 97dcd459a7ec23c9438983fe14a23aef03b09bad /include/linux/module.h | |
parent | 683c5e853ebe2d1ac72128f1828421de7fc3a23c (diff) | |
parent | f946eeb9313ff1470758e171a60fe7438a2ded3f (diff) | |
download | linux-fsl-qoriq-d25413efa9536e2f425ea45c7720598035c597bc.tar.xz |
Merge git://github.com/rustyrussell/linux
Pull module and param updates from Rusty Russell:
"I'm getting married next week, and then honeymoon until 6th May. I'll
be offline from next week, except to post the compulsory pictures if
Alex shaves her head..."
I'm sure Rusty can take time off from his honeymoon if something comes
up. And here's the explanation about head shaving:
http://baldalex.org/
in case you wondered and wanted to support another insane caper or
Rusty's involving shaving.
What *is* it with Rusty and shaving, anyway?
* git://github.com/rustyrussell/linux:
module: Remove module size limit
module: move __module_get and try_module_get() out of line.
params: <level>_initcall-like kernel parameters
module_param: remove support for bool parameters which are really int.
module: add kernel param to force disable module load
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 4598bf0..fbcafe2 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -21,8 +21,6 @@ #include <linux/percpu.h> #include <asm/module.h> -#include <trace/events/module.h> - /* Not Yet Implemented */ #define MODULE_SUPPORTED_DEVICE(name) @@ -452,33 +450,11 @@ void symbol_put_addr(void *addr); /* Sometimes we know we already have a refcount, and it's easier not to handle the error case (which only happens with rmmod --wait). */ -static inline void __module_get(struct module *module) -{ - if (module) { - preempt_disable(); - __this_cpu_inc(module->refptr->incs); - trace_module_get(module, _THIS_IP_); - preempt_enable(); - } -} - -static inline int try_module_get(struct module *module) -{ - int ret = 1; - - if (module) { - preempt_disable(); +extern void __module_get(struct module *module); - if (likely(module_is_live(module))) { - __this_cpu_inc(module->refptr->incs); - trace_module_get(module, _THIS_IP_); - } else - ret = 0; - - preempt_enable(); - } - return ret; -} +/* This is the Right Way to get a module: if it fails, it's being removed, + * so pretend it's not there. */ +extern bool try_module_get(struct module *module); extern void module_put(struct module *module); |