staging: lustre: remove wrappers for two atomic functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:03:39 +0000 (08:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:03:39 +0000 (08:03 +0800)
Just call them directly, like the rest of the kernel does.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/osc/osc_page.c

index e210a90655b97d2bba26520753e08a4245110857..722d90cfef162432c364aa38b53b547b455d98dc 100644 (file)
@@ -165,10 +165,4 @@ do {                                                                \
 #define cfs_waitq_wait_event_interruptible_timeout(wq, c, timeout, ret) \
        ret = wait_event_interruptible_timeout(wq, c, timeout)
 
-/*
- * atomic
- */
-#define cfs_atomic_add_unless(atom, a, u)    atomic_add_unless(atom, a, u)
-#define cfs_atomic_cmpxchg(atom, old, nv)    atomic_cmpxchg(atom, old, nv)
-
 #endif
index 179ea9abf68f4f297a8c8ae8193004b158a454b2..db349f68e32e60405fabf135c5f0615267aaf57c 100644 (file)
@@ -419,7 +419,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, const char *buffer,
                                break;
 
                        nv = ov > diff ? ov - diff : 0;
-                       rc = cfs_atomic_cmpxchg(&cache->ccc_lru_left, ov, nv);
+                       rc = atomic_cmpxchg(&cache->ccc_lru_left, ov, nv);
                        if (likely(ov == rc)) {
                                diff -= ov - nv;
                                nrpages += ov - nv;
index ed84df0a4e600442006fd2d4a94a97b9c0a9c2f4..159dda07f43a5a7c00fa7009c068d1ac6515b0e3 100644 (file)
@@ -881,7 +881,7 @@ static int osc_lru_reserve(const struct lu_env *env, struct osc_object *obj,
                return 0;
 
        LASSERT(atomic_read(cli->cl_lru_left) >= 0);
-       while (!cfs_atomic_add_unless(cli->cl_lru_left, -1, 0)) {
+       while (!atomic_add_unless(cli->cl_lru_left, -1, 0)) {
                int gen;
 
                /* run out of LRU spaces, try to drop some by itself */
This page took 0.02775 seconds and 5 git commands to generate.