prior to this patch, on certain platforms (ie: armv7l), compilation fails due
to atomic64_sub_return_release not being defined here. Ensure that the atomics
header is pulled in, and ensure that it is available in all cases, regardless
of whether ATOMIC64_SPINLOCK is defined.
Signed-off-by: Nicholas Sielicki <linux@opensource.nslick.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
return atomic64_cmpxchg(v, old, new);
}
return atomic64_cmpxchg(v, old, new);
}
+static inline s64 atomic64_sub_return_release(s64 i, atomic64_t *v)
+{
+ smp_mb__before_atomic();
+ return atomic64_sub_return(i, v);
+}
+
#endif
#endif /* __TOOLS_LINUX_ATOMIC_H */
#endif
#endif /* __TOOLS_LINUX_ATOMIC_H */
#include "journal.h"
#include "journal_reclaim.h"
#include "journal.h"
#include "journal_reclaim.h"
+#include <linux/atomic.h>
#include <linux/sort.h>
static int btree_write_buffered_key_cmp(const void *_l, const void *_r)
#include <linux/sort.h>
static int btree_write_buffered_key_cmp(const void *_l, const void *_r)