* [PATCH] module: module_unload_init() cleanup
@ 2010-06-02 5:32 Eric Dumazet
2010-06-02 6:16 ` Rusty Russell
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2010-06-02 5:32 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, Tejun Heo
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] module: module_unload_init() cleanup
2010-06-02 5:32 [PATCH] module: module_unload_init() cleanup Eric Dumazet
@ 2010-06-02 6:16 ` Rusty Russell
2010-06-02 6:25 ` Rusty Russell
0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2010-06-02 6:16 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel, Tejun Heo, Nick Piggin
On Wed, 2 Jun 2010 03:02:20 pm Eric Dumazet wrote:
> 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>
Thanks, applied!
I know it's trivial, but you should have cc'd Nick since this was his patch.
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] module: module_unload_init() cleanup
2010-06-02 6:16 ` Rusty Russell
@ 2010-06-02 6:25 ` Rusty Russell
2010-06-02 6:39 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2010-06-02 6:25 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel, Tejun Heo, Nick Piggin
On Wed, 2 Jun 2010 03:46:33 pm Rusty Russell wrote:
> On Wed, 2 Jun 2010 03:02:20 pm Eric Dumazet wrote:
> > 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>
>
> Thanks, applied!
>
> I know it's trivial, but you should have cc'd Nick since this was his patch.
Hmm, and checked for warnings:
kernel/module.c: In function ‘module_unload_init’:
kernel/module.c:529: warning: unused variable ‘cpu’
Fixed,
Rusty.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-02 6:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 5:32 [PATCH] module: module_unload_init() cleanup Eric Dumazet
2010-06-02 6:16 ` Rusty Russell
2010-06-02 6:25 ` Rusty Russell
2010-06-02 6:39 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox