Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 305ec768 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c88a6cbb
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -165,10 +165,4 @@ do { \
#define cfs_waitq_wait_event_interruptible_timeout(wq, c, timeout, ret) \
#define cfs_waitq_wait_event_interruptible_timeout(wq, c, timeout, ret) \
	ret = wait_event_interruptible_timeout(wq, c, timeout)
	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
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -419,7 +419,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, const char *buffer,
				break;
				break;


			nv = ov > diff ? ov - diff : 0;
			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)) {
			if (likely(ov == rc)) {
				diff -= ov - nv;
				diff -= ov - nv;
				nrpages += ov - nv;
				nrpages += ov - nv;
+1 −1
Original line number Original line Diff line number Diff line
@@ -881,7 +881,7 @@ static int osc_lru_reserve(const struct lu_env *env, struct osc_object *obj,
		return 0;
		return 0;


	LASSERT(atomic_read(cli->cl_lru_left) >= 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;
		int gen;


		/* run out of LRU spaces, try to drop some by itself */
		/* run out of LRU spaces, try to drop some by itself */