From: Chris Snook Date: Tue, 29 Jan 2008 04:58:27 +0000 (-0500) Subject: jbd2: Remove printk from J_ASSERT to preserve registers during BUG X-Git-Tag: v2.6.25-rc1~1166^2~25 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36df53f4a3e445175fc1e9d7f433599482ec6d7f;p=linux-2.6 jbd2: Remove printk from J_ASSERT to preserve registers during BUG Signed-off-by: Chris Snook Cc: "Stephen C. Tweedie" Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: "Theodore Ts'o" --- diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 06ef114570..d5f7cff4cb 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -256,17 +256,7 @@ typedef struct journal_superblock_s #include #include -#define JBD2_ASSERTIONS -#ifdef JBD2_ASSERTIONS -#define J_ASSERT(assert) \ -do { \ - if (!(assert)) { \ - printk (KERN_EMERG \ - "Assertion failure in %s() at %s:%d: \"%s\"\n", \ - __FUNCTION__, __FILE__, __LINE__, # assert); \ - BUG(); \ - } \ -} while (0) +#define J_ASSERT(assert) BUG_ON(!(assert)) #if defined(CONFIG_BUFFER_DEBUG) void buffer_assertion_failure(struct buffer_head *bh); @@ -282,10 +272,6 @@ void buffer_assertion_failure(struct buffer_head *bh); #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) #endif -#else -#define J_ASSERT(assert) do { } while (0) -#endif /* JBD2_ASSERTIONS */ - #if defined(JBD2_PARANOID_IOFAIL) #define J_EXPECT(expr, why...) J_ASSERT(expr) #define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)