aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-12-17 23:47:33 -0800
committerKent Overstreet <kmo@daterainc.com>2014-01-08 13:05:13 -0800
commitdc9d98d621bdce0552997200ce855659875a5c9f (patch)
treed0339299ab01f50dd225446734a7d34164df2817 /drivers/md/bcache/util.h
parentbcache: Convert btree_iter to struct btree_keys (diff)
downloadlinux-dev-dc9d98d621bdce0552997200ce855659875a5c9f.tar.xz
linux-dev-dc9d98d621bdce0552997200ce855659875a5c9f.zip
bcache: Convert debug code to btree_keys
More work to disentangle various code from struct btree Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/util.h')
-rw-r--r--drivers/md/bcache/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index 3ebaef5f645b..ac7d0d1f70d7 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -18,11 +18,13 @@ struct closure;
#ifdef CONFIG_BCACHE_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)
#else /* DEBUG */
+#define EBUG_ON(cond) do { if (cond); } while (0)
#define atomic_dec_bug(v) atomic_dec(v)
#define atomic_inc_bug(v, i) atomic_inc(v)