diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-07-18 05:23:14 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-18 05:23:14 -0700 |
| commit | 518538b3446367487ff8fc3e8de5fc22076b5b8a (patch) | |
| tree | 99ce04de086489fd140a559e9201af60625b569d /kernel | |
| parent | f9feecc3eda1299617c2fe764e3ebbbf37cc1fec (diff) | |
[PATCH] Resolve module local_t conflict
Uses local_t for module reference counts.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c index ea1cf83ee2b3..e40c1ec25fd6 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -374,9 +374,9 @@ static void module_unload_init(struct module *mod) INIT_LIST_HEAD(&mod->modules_which_use_me); for (i = 0; i < NR_CPUS; i++) - atomic_set(&mod->ref[i].count, 0); + local_set(&mod->ref[i].count, 0); /* Hold reference count during initialization. */ - atomic_set(&mod->ref[smp_processor_id()].count, 1); + local_set(&mod->ref[smp_processor_id()].count, 1); /* Backwards compatibility macros put refcount during init. */ mod->waiter = current; } @@ -599,7 +599,7 @@ unsigned int module_refcount(struct module *mod) unsigned int i, total = 0; for (i = 0; i < NR_CPUS; i++) - total += atomic_read(&mod->ref[i].count); + total += local_read(&mod->ref[i].count); return total; } EXPORT_SYMBOL(module_refcount); |
