diff options
| author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-04 13:37:06 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-04 13:37:06 -0500 |
| commit | 9b8ab9f6c37c610feea20edfb357a3b8a43d39bd (patch) | |
| tree | 02d18c920a03a600e915d66d6a471d900857b3ac /include/linux/module.h | |
| parent | 12472b4165a21f5415ff4f60f8f46311a6b7b9ac (diff) | |
| parent | f23f6e08c47acbdd20e9c49a79da8c404ea168e1 (diff) | |
Merge branch 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird
* 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird:
[PATCH] severing poll.h -> mm.h
[PATCH] severing skbuff.h -> mm.h
[PATCH] severing skbuff.h -> poll.h
[PATCH] severing skbuff.h -> highmem.h
[PATCH] severing uaccess.h -> sched.h
[PATCH] severing fs.h, radix-tree.h -> sched.h
[PATCH] severing module.h->sched.h
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 9258ffd8a7f0..d33df2408e05 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
| 7 | * Rewritten again by Rusty Russell, 2002 | 7 | * Rewritten again by Rusty Russell, 2002 |
| 8 | */ | 8 | */ |
| 9 | #include <linux/sched.h> | ||
| 10 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
| 11 | #include <linux/list.h> | 10 | #include <linux/list.h> |
| 12 | #include <linux/stat.h> | 11 | #include <linux/stat.h> |
| @@ -411,17 +410,7 @@ static inline int try_module_get(struct module *module) | |||
| 411 | return ret; | 410 | return ret; |
| 412 | } | 411 | } |
| 413 | 412 | ||
| 414 | static inline void module_put(struct module *module) | 413 | extern void module_put(struct module *module); |
| 415 | { | ||
| 416 | if (module) { | ||
| 417 | unsigned int cpu = get_cpu(); | ||
| 418 | local_dec(&module->ref[cpu].count); | ||
| 419 | /* Maybe they're waiting for us to drop reference? */ | ||
| 420 | if (unlikely(!module_is_live(module))) | ||
| 421 | wake_up_process(module->waiter); | ||
| 422 | put_cpu(); | ||
| 423 | } | ||
| 424 | } | ||
| 425 | 414 | ||
| 426 | #else /*!CONFIG_MODULE_UNLOAD*/ | 415 | #else /*!CONFIG_MODULE_UNLOAD*/ |
| 427 | static inline int try_module_get(struct module *module) | 416 | static inline int try_module_get(struct module *module) |
