More patch description fixups. Standardize case.
[ext4-patch-queue.git] / jbd2-remove-printk-from-j_assert-macros.patch
blob19c3053898b5234ab226e4daff1e32e3caebe540
1 jbd2: Remove printk from J_ASSERT to preserve registers during BUG
3 From: Chris Snook <csnook@redhat.com>
5 Signed-off-by: Chris Snook <csnook@redhat.com>
6 Cc: "Stephen C. Tweedie" <sct@redhat.com>
7 Cc: Theodore Ts'o <tytso@mit.edu>
8 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
9 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
10 ---
12 include/linux/jbd2.h | 16 +---------------
13 1 files changed, 1 insertions(+), 15 deletions(-)
16 diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
17 index 06ef114..d5f7cff 100644
18 --- a/include/linux/jbd2.h
19 +++ b/include/linux/jbd2.h
20 @@ -256,17 +256,7 @@ typedef struct journal_superblock_s
21 #include <linux/fs.h>
22 #include <linux/sched.h>
24 -#define JBD2_ASSERTIONS
25 -#ifdef JBD2_ASSERTIONS
26 -#define J_ASSERT(assert) \
27 -do { \
28 - if (!(assert)) { \
29 - printk (KERN_EMERG \
30 - "Assertion failure in %s() at %s:%d: \"%s\"\n", \
31 - __FUNCTION__, __FILE__, __LINE__, # assert); \
32 - BUG(); \
33 - } \
34 -} while (0)
35 +#define J_ASSERT(assert) BUG_ON(!(assert))
37 #if defined(CONFIG_BUFFER_DEBUG)
38 void buffer_assertion_failure(struct buffer_head *bh);
39 @@ -282,10 +272,6 @@ void buffer_assertion_failure(struct buffer_head *bh);
40 #define J_ASSERT_JH(jh, expr) J_ASSERT(expr)
41 #endif
43 -#else
44 -#define J_ASSERT(assert) do { } while (0)
45 -#endif /* JBD2_ASSERTIONS */
47 #if defined(JBD2_PARANOID_IOFAIL)
48 #define J_EXPECT(expr, why...) J_ASSERT(expr)
49 #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)