summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2015-02-05 19:52:55 -0800
committerKent Overstreet <kmo@daterainc.com>2015-02-12 23:44:06 -0800
commit60e15cced911f156435de211346a5e64ccb90274 (patch)
treea6b0ed500f47fed2e4671ade761c4461b46df7fa
parentb2961fdc4ad5b3279983c334ad8ba2068b0cbf68 (diff)
bcache: Move some assertions to debug builds
Change-Id: I091cf50d9c0bac4ce111daef169bb992523bf47a
-rw-r--r--drivers/md/bcache/bkey.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/bcache/bkey.h b/drivers/md/bcache/bkey.h
index 1ce802feeaa0..bba9371457dc 100644
--- a/drivers/md/bcache/bkey.h
+++ b/drivers/md/bcache/bkey.h
@@ -374,19 +374,19 @@ struct bkey_s_c_##name { \
\
static inline struct bkey_i_##name *bkey_i_to_##name(struct bkey_i *k) \
{ \
- BUG_ON(k->k.type != nr); \
+ EBUG_ON(k->k.type != nr); \
return container_of(&k->k, struct bkey_i_##name, k); \
} \
\
static inline const struct bkey_i_##name *bkey_i_to_##name##_c(const struct bkey_i *k)\
{ \
- BUG_ON(k->k.type != nr); \
+ EBUG_ON(k->k.type != nr); \
return container_of(&k->k, struct bkey_i_##name, k); \
} \
\
static inline struct bkey_s_##name bkey_s_to_##name(struct bkey_s k) \
{ \
- BUG_ON(k.k->type != nr); \
+ EBUG_ON(k.k->type != nr); \
return (struct bkey_s_##name) { \
.k = k.k, \
.v = container_of(k.v, struct bch_##name, v), \
@@ -395,7 +395,7 @@ static inline struct bkey_s_##name bkey_s_to_##name(struct bkey_s k) \
\
static inline struct bkey_s_c_##name bkey_s_c_to_##name(struct bkey_s_c k)\
{ \
- BUG_ON(k.k->type != nr); \
+ EBUG_ON(k.k->type != nr); \
return (struct bkey_s_c_##name) { \
.k = k.k, \
.v = container_of(k.v, struct bch_##name, v), \
@@ -428,7 +428,7 @@ static inline struct bkey_s_c_##name name##_s_to_s_c(struct bkey_s_##name k)\
\
static inline struct bkey_s_##name bkey_i_to_s_##name(struct bkey_i *k) \
{ \
- BUG_ON(k->k.type != nr); \
+ EBUG_ON(k->k.type != nr); \
return (struct bkey_s_##name) { \
.k = &k->k, \
.v = container_of(&k->v, struct bch_##name, v), \
@@ -437,7 +437,7 @@ static inline struct bkey_s_##name bkey_i_to_s_##name(struct bkey_i *k) \
\
static inline struct bkey_s_c_##name bkey_i_to_s_c_##name(const struct bkey_i *k)\
{ \
- BUG_ON(k->k.type != nr); \
+ EBUG_ON(k->k.type != nr); \
return (struct bkey_s_c_##name) { \
.k = &k->k, \
.v = container_of(&k->v, struct bch_##name, v), \