diff options
| author | Tejun Heo <tj@kernel.org> | 2012-04-01 15:30:01 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2012-04-01 15:55:00 -0400 |
| commit | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (patch) | |
| tree | 3ba9c94ec346275fb44c4f0d1cd2537cdff8d811 /include/linux/module.h | |
| parent | a5567932fc926739e29e98487128080f40c61710 (diff) | |
| parent | 48ddbe194623ae089cc0576e60363f2d2e85662a (diff) | |
Merge branch 'for-3.5' of ../cgroup into block/for-3.5/core-merged
cgroup/for-3.5 contains the following changes which blk-cgroup needs
to proceed with the on-going cleanup.
* Dynamic addition and removal of cftypes to make config/stat file
handling modular for policies.
* cgroup removal update to not wait for css references to drain to fix
blkcg removal hang caused by cfq caching cfqgs.
Pull in cgroup/for-3.5 into block/for-3.5/core. This causes the
following conflicts in block/blk-cgroup.c.
* 761b3ef50e "cgroup: remove cgroup_subsys argument from callbacks"
conflicts with blkiocg_pre_destroy() addition and blkiocg_attach()
removal. Resolved by removing @subsys from all subsys methods.
* 676f7c8f84 "cgroup: relocate cftype and cgroup_subsys definitions in
controllers" conflicts with ->pre_destroy() and ->attach() updates
and removal of modular config. Resolved by dropping forward
declarations of the methods and applying updates to the relocated
blkio_subsys.
* 4baf6e3325 "cgroup: convert all non-memcg controllers to the new
cftype interface" builds upon the previous item. Resolved by adding
->base_cftypes to the relocated blkio_subsys.
Signed-off-by: Tejun Heo <tj@kernel.org>
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 4598bf03e98..fbcafe2ee13 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -21,8 +21,6 @@ | |||
| 21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
| 22 | #include <asm/module.h> | 22 | #include <asm/module.h> |
| 23 | 23 | ||
| 24 | #include <trace/events/module.h> | ||
| 25 | |||
| 26 | /* Not Yet Implemented */ | 24 | /* Not Yet Implemented */ |
| 27 | #define MODULE_SUPPORTED_DEVICE(name) | 25 | #define MODULE_SUPPORTED_DEVICE(name) |
| 28 | 26 | ||
| @@ -452,33 +450,11 @@ void symbol_put_addr(void *addr); | |||
| 452 | 450 | ||
| 453 | /* Sometimes we know we already have a refcount, and it's easier not | 451 | /* Sometimes we know we already have a refcount, and it's easier not |
| 454 | to handle the error case (which only happens with rmmod --wait). */ | 452 | to handle the error case (which only happens with rmmod --wait). */ |
| 455 | static inline void __module_get(struct module *module) | 453 | extern void __module_get(struct module *module); |
| 456 | { | ||
| 457 | if (module) { | ||
| 458 | preempt_disable(); | ||
| 459 | __this_cpu_inc(module->refptr->incs); | ||
| 460 | trace_module_get(module, _THIS_IP_); | ||
| 461 | preempt_enable(); | ||
| 462 | } | ||
| 463 | } | ||
| 464 | |||
| 465 | static inline int try_module_get(struct module *module) | ||
| 466 | { | ||
| 467 | int ret = 1; | ||
| 468 | |||
| 469 | if (module) { | ||
| 470 | preempt_disable(); | ||
| 471 | 454 | ||
| 472 | if (likely(module_is_live(module))) { | 455 | /* This is the Right Way to get a module: if it fails, it's being removed, |
| 473 | __this_cpu_inc(module->refptr->incs); | 456 | * so pretend it's not there. */ |
| 474 | trace_module_get(module, _THIS_IP_); | 457 | extern bool try_module_get(struct module *module); |
| 475 | } else | ||
| 476 | ret = 0; | ||
| 477 | |||
| 478 | preempt_enable(); | ||
| 479 | } | ||
| 480 | return ret; | ||
| 481 | } | ||
| 482 | 458 | ||
| 483 | extern void module_put(struct module *module); | 459 | extern void module_put(struct module *module); |
| 484 | 460 | ||
