summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-08-05 20:59:00 +0200
committerRusty Russell <rusty@rustcorp.com.au>2010-08-05 05:29:02 +0200
commit2409e74278b7fb917d39ef6d3c16223c04a386f2 (patch)
treea5b9fe3cefc536960d3e5de819e46f375ed5476c /kernel/module.c
parentMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jiko... (diff)
downloadlinux-2409e74278b7fb917d39ef6d3c16223c04a386f2.tar.xz
linux-2409e74278b7fb917d39ef6d3c16223c04a386f2.zip
module: module_unload_init() cleanup
No need to clear mod->refptr in module_unload_init(), since alloc_percpu() already clears allocated chunks. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed unused var)
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 6c562828c85c..404e722930fc 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -526,14 +526,8 @@ EXPORT_TRACEPOINT_SYMBOL(module_get);
/* Init the unload section of the module. */
static void module_unload_init(struct module *mod)
{
- int cpu;
-
INIT_LIST_HEAD(&mod->source_list);
INIT_LIST_HEAD(&mod->target_list);
- for_each_possible_cpu(cpu) {
- per_cpu_ptr(mod->refptr, cpu)->incs = 0;
- per_cpu_ptr(mod->refptr, cpu)->decs = 0;
- }
/* Hold reference count during initialization. */
__this_cpu_write(mod->refptr->incs, 1);