module: Replace module_ref with atomic_t refcnt

Replace module_ref per-cpu complex reference counter with
an atomic_t simple refcnt. This is for code simplification.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Masami Hiramatsu
2014-11-10 09:29:29 +10:30
committed by Rusty Russell
parent 0286b5ea12
commit 2f35c41f58
3 changed files with 7 additions and 50 deletions

View File

@@ -80,7 +80,7 @@ DECLARE_EVENT_CLASS(module_refcnt,
TP_fast_assign(
__entry->ip = ip;
__entry->refcnt = __this_cpu_read(mod->refptr->incs) - __this_cpu_read(mod->refptr->decs);
__entry->refcnt = atomic_read(&mod->refcnt);
__assign_str(name, mod->name);
),