mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-22 00:00:03 +03:00
btree_write_buffer: ensure atomic64_sub_return_release availability
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>
This commit is contained in:
parent
974d9bf000
commit
81352a29bc
@ -324,6 +324,12 @@ static inline s64 atomic64_cmpxchg_acquire(atomic64_t *v, s64 old, s64 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 */
|
||||
|
@ -9,6 +9,7 @@
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user