diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-11-13 20:53:24 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:46 -0400 |
commit | 961cbdef3c270266e17aa831cf22eb14b900af65 (patch) | |
tree | b02d7fbd5a322eb9e7803c4309dc841e9f957b63 /fs/bcachefs/util.h | |
parent | b2d1d56b1d34bcfb6da77eb74a2fbcdea92514f9 (diff) |
bcachefs: Delete atomic_inc_bug()
These were wrappers around atomic operations that verified that the
counter wasn't negative, but they're dead code - delete.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r-- | fs/bcachefs/util.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 4243a22c766c..67b0d3de24cc 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -23,33 +23,9 @@ struct closure; #ifdef CONFIG_BCACHEFS_DEBUG - #define EBUG_ON(cond) BUG_ON(cond) -#define atomic_dec_bug(v) BUG_ON(atomic_dec_return(v) < 0) -#define atomic_inc_bug(v, i) BUG_ON(atomic_inc_return(v) <= i) -#define atomic_sub_bug(i, v) BUG_ON(atomic_sub_return(i, v) < 0) -#define atomic_add_bug(i, v) BUG_ON(atomic_add_return(i, v) < 0) -#define atomic_long_dec_bug(v) BUG_ON(atomic_long_dec_return(v) < 0) -#define atomic_long_sub_bug(i, v) BUG_ON(atomic_long_sub_return(i, v) < 0) -#define atomic64_dec_bug(v) BUG_ON(atomic64_dec_return(v) < 0) -#define atomic64_inc_bug(v, i) BUG_ON(atomic64_inc_return(v) <= i) -#define atomic64_sub_bug(i, v) BUG_ON(atomic64_sub_return(i, v) < 0) -#define atomic64_add_bug(i, v) BUG_ON(atomic64_add_return(i, v) < 0) - -#else /* DEBUG */ - +#else #define EBUG_ON(cond) -#define atomic_dec_bug(v) atomic_dec(v) -#define atomic_inc_bug(v, i) atomic_inc(v) -#define atomic_sub_bug(i, v) atomic_sub(i, v) -#define atomic_add_bug(i, v) atomic_add(i, v) -#define atomic_long_dec_bug(v) atomic_long_dec(v) -#define atomic_long_sub_bug(i, v) atomic_long_sub(i, v) -#define atomic64_dec_bug(v) atomic64_dec(v) -#define atomic64_inc_bug(v, i) atomic64_inc(v) -#define atomic64_sub_bug(i, v) atomic64_sub(i, v) -#define atomic64_add_bug(i, v) atomic64_add(i, v) - #endif #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |