diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-11-18 08:15:35 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-11-18 08:15:35 -0800 |
| commit | bfe687b3aa98e5bba38802a9df74d1bf16ce267a (patch) | |
| tree | a3399e57b0c84541466307169c95ad9f1210f8a9 /lib | |
| parent | e71775ef6919b09c34442c888bda7d30b70e9462 (diff) | |
[PATCH] fix percpu_counter_mod linkage problem
If both ext2 and ext3 are built as modules there is nothing to pull
percpu_counter_mod() into the kernel build and the ext2 and ext3 modules do
not load.
So move percpu_counter_mod() out of lib.a.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Makefile | 1 | ||||
| -rw-r--r-- | lib/percpu_counter.c | 21 |
2 files changed, 0 insertions, 22 deletions
diff --git a/lib/Makefile b/lib/Makefile index 3ba542f64d6d..3bc9013c4b97 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -9,7 +9,6 @@ lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o -lib-$(CONFIG_SMP) += percpu_counter.o ifneq ($(CONFIG_HAVE_DEC_LOCK),y) lib-y += dec_and_lock.o diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c deleted file mode 100644 index 2c5c7b575361..000000000000 --- a/lib/percpu_counter.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <linux/module.h> -#include <linux/percpu_counter.h> -#include <linux/sched.h> - -void percpu_counter_mod(struct percpu_counter *fbc, long amount) -{ - int cpu = get_cpu(); - long count = fbc->counters[cpu].count; - - count += amount; - if (count >= FBC_BATCH || count <= -FBC_BATCH) { - spin_lock(&fbc->lock); - fbc->count += count; - spin_unlock(&fbc->lock); - count = 0; - } - fbc->counters[cpu].count = count; - put_cpu(); -} - -EXPORT_SYMBOL(percpu_counter_mod); |
