diff options
Diffstat (limited to 'fs/xfs/support')
-rw-r--r-- | fs/xfs/support/debug.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index a27a7c8c0526..855da0408647 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h | |||
@@ -34,10 +34,10 @@ extern void cmn_err(int, char *, ...) | |||
34 | extern void assfail(char *expr, char *f, int l); | 34 | extern void assfail(char *expr, char *f, int l); |
35 | 35 | ||
36 | #define ASSERT_ALWAYS(expr) \ | 36 | #define ASSERT_ALWAYS(expr) \ |
37 | (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) | 37 | (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) |
38 | 38 | ||
39 | #ifndef DEBUG | 39 | #ifndef DEBUG |
40 | # define ASSERT(expr) ((void)0) | 40 | #define ASSERT(expr) ((void)0) |
41 | 41 | ||
42 | #ifndef STATIC | 42 | #ifndef STATIC |
43 | # define STATIC static noinline | 43 | # define STATIC static noinline |
@@ -49,8 +49,10 @@ extern void assfail(char *expr, char *f, int l); | |||
49 | 49 | ||
50 | #else /* DEBUG */ | 50 | #else /* DEBUG */ |
51 | 51 | ||
52 | # define ASSERT(expr) ASSERT_ALWAYS(expr) | 52 | #include <linux/random.h> |
53 | # include <linux/random.h> | 53 | |
54 | #define ASSERT(expr) \ | ||
55 | (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) | ||
54 | 56 | ||
55 | #ifndef STATIC | 57 | #ifndef STATIC |
56 | # define STATIC noinline | 58 | # define STATIC noinline |