lkml.org 
[lkml]   [2010]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] module: module_unload_init() cleanup
From
Date
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>
---
kernel/module.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 0129769..15acb25 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -524,10 +524,6 @@ static void module_unload_init(struct module *mod)
int cpu;

INIT_LIST_HEAD(&mod->modules_which_use_me);
- 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);



\
 
 \ /
  Last update: 2010-06-02 07:35    [W:0.047 / U:42.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site