Commit f6a570333e554b48ad589e7137c77c57809eee81
1 parent
2b5f6dcce5
Exists in
master
and in
39 other branches
[PATCH] severing module.h->sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 16 changed files with 29 additions and 14 deletions Side-by-side Diff
- arch/i386/kernel/alternative.c
- arch/i386/kernel/cpu/mcheck/therm_throt.c
- drivers/base/cpu.c
- drivers/hwmon/abituguru.c
- drivers/leds/ledtrig-ide-disk.c
- drivers/leds/ledtrig-timer.c
- drivers/pci/access.c
- drivers/scsi/scsi_transport_sas.c
- drivers/w1/slaves/w1_therm.c
- include/asm-x86_64/elf.h
- include/linux/acct.h
- include/linux/module.h
- include/scsi/libiscsi.h
- kernel/latency.c
- kernel/module.c
- lib/random32.c
arch/i386/kernel/alternative.c
arch/i386/kernel/cpu/mcheck/therm_throt.c
drivers/base/cpu.c
drivers/hwmon/abituguru.c
drivers/leds/ledtrig-ide-disk.c
drivers/leds/ledtrig-timer.c
drivers/pci/access.c
drivers/scsi/scsi_transport_sas.c
drivers/w1/slaves/w1_therm.c
include/asm-x86_64/elf.h
include/linux/acct.h
... | ... | @@ -119,6 +119,7 @@ |
119 | 119 | #ifdef CONFIG_BSD_PROCESS_ACCT |
120 | 120 | struct vfsmount; |
121 | 121 | struct super_block; |
122 | +struct pacct_struct; | |
122 | 123 | extern void acct_auto_close_mnt(struct vfsmount *m); |
123 | 124 | extern void acct_auto_close(struct super_block *sb); |
124 | 125 | extern void acct_init_pacct(struct pacct_struct *pacct); |
include/linux/module.h
... | ... | @@ -6,7 +6,6 @@ |
6 | 6 | * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996 |
7 | 7 | * Rewritten again by Rusty Russell, 2002 |
8 | 8 | */ |
9 | -#include <linux/sched.h> | |
10 | 9 | #include <linux/spinlock.h> |
11 | 10 | #include <linux/list.h> |
12 | 11 | #include <linux/stat.h> |
... | ... | @@ -411,17 +410,7 @@ |
411 | 410 | return ret; |
412 | 411 | } |
413 | 412 | |
414 | -static inline 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 | -} | |
413 | +extern void module_put(struct module *module); | |
425 | 414 | |
426 | 415 | #else /*!CONFIG_MODULE_UNLOAD*/ |
427 | 416 | static inline int try_module_get(struct module *module) |
include/scsi/libiscsi.h
kernel/latency.c
kernel/module.c
... | ... | @@ -34,10 +34,10 @@ |
34 | 34 | #include <linux/err.h> |
35 | 35 | #include <linux/vermagic.h> |
36 | 36 | #include <linux/notifier.h> |
37 | +#include <linux/sched.h> | |
37 | 38 | #include <linux/stop_machine.h> |
38 | 39 | #include <linux/device.h> |
39 | 40 | #include <linux/string.h> |
40 | -#include <linux/sched.h> | |
41 | 41 | #include <linux/mutex.h> |
42 | 42 | #include <linux/unwind.h> |
43 | 43 | #include <asm/uaccess.h> |
... | ... | @@ -789,6 +789,19 @@ |
789 | 789 | .attr = { .name = "refcnt", .mode = 0444, .owner = THIS_MODULE }, |
790 | 790 | .show = show_refcnt, |
791 | 791 | }; |
792 | + | |
793 | +void module_put(struct module *module) | |
794 | +{ | |
795 | + if (module) { | |
796 | + unsigned int cpu = get_cpu(); | |
797 | + local_dec(&module->ref[cpu].count); | |
798 | + /* Maybe they're waiting for us to drop reference? */ | |
799 | + if (unlikely(!module_is_live(module))) | |
800 | + wake_up_process(module->waiter); | |
801 | + put_cpu(); | |
802 | + } | |
803 | +} | |
804 | +EXPORT_SYMBOL(module_put); | |
792 | 805 | |
793 | 806 | #else /* !CONFIG_MODULE_UNLOAD */ |
794 | 807 | static void print_unload_info(struct seq_file *m, struct module *mod) |