summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 08:03:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 08:03:39 +0800
commit305ec768ff192996b4dcb326c5980cd8a96fa948 (patch)
tree70e468191e5db1302ca66355969f3d62426f6bce /drivers/staging/lustre
parentc88a6cbb7750585f9aadf034ee536cf8228c9964 (diff)
staging: lustre: remove wrappers for two atomic functions
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>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h6
-rw-r--r--drivers/staging/lustre/lustre/llite/lproc_llite.c2
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_page.c2
3 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
index e210a90655b9..722d90cfef16 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
@@ -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
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 179ea9abf68f..db349f68e32e 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -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;
diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c
index ed84df0a4e60..159dda07f43a 100644
--- a/drivers/staging/lustre/lustre/osc/osc_page.c
+++ b/drivers/staging/lustre/lustre/osc/osc_page.c
@@ -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 */