summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2015-02-03 23:56:49 -0800
committerKent Overstreet <kmo@daterainc.com>2015-02-12 23:43:50 -0800
commit6c5c28c21e1d98006161b9fd2485765786150ae7 (patch)
treec2c19d452353bc6132d4565dde342cab61bf4561
parentfc69feda3382bf450d54fc3285358b45fa1a586c (diff)
bcache: don't evaluate EBUG_ON() expressions when not in debug mode
Change-Id: I14c6c1328a2a7509d024aebedf86a9d8572fced9
-rw-r--r--drivers/md/bcache/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index f9dc15974900..f727fcdf6ca2 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -18,7 +18,7 @@ struct closure;
#ifdef CONFIG_BCACHE_DEBUG
-#define EBUG_ON(cond) BUG_ON(cond)
+#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)
@@ -30,7 +30,7 @@ struct closure;
#else /* DEBUG */
-#define EBUG_ON(cond) do { if (cond); } while (0)
+#define EBUG_ON(cond) (false && (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)