From: Chris Snook <csnook@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Stephen Tweedie <sct@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/2] jbd2: remove printk() from J_ASSERT macros
Date: Mon, 20 Aug 2007 10:26:06 -0400 [thread overview]
Message-ID: <20070820142606.GB14588@shell.boston.redhat.com> (raw)
In-Reply-To: <46C9A30E.3050103@redhat.com>
From: Chris Snook <csnook@redhat.com>
Remove printk from J_ASSERT to preserve registers during BUG.
Signed-off-by: Chris Snook <csnook@redhat.com>
--- linux-2.6.23-rc3-orig/include/linux/jbd2.h 2007-08-13 03:14:13.000000000 -0400
+++ linux-2.6.23-rc3-patch/include/linux/jbd2.h 2007-08-20 09:55:47.000000000 -0400
@@ -255,17 +255,7 @@ typedef struct journal_superblock_s
#include <linux/fs.h>
#include <linux/sched.h>
-#define JBD_ASSERTIONS
-#ifdef JBD_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);
@@ -281,10 +271,6 @@ void buffer_assertion_failure(struct buf
#define J_ASSERT_JH(jh, expr) J_ASSERT(expr)
#endif
-#else
-#define J_ASSERT(assert) do { } while (0)
-#endif /* JBD_ASSERTIONS */
-
#if defined(JBD_PARANOID_IOFAIL)
#define J_EXPECT(expr, why...) J_ASSERT(expr)
#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
prev parent reply other threads:[~2007-08-20 14:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-20 14:19 [PATCH 0/2] remove printk() from J_ASSERT macros Chris Snook
2007-08-20 14:24 ` [PATCH 1/2] jbd: " Chris Snook
2007-08-20 14:26 ` Chris Snook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070820142606.GB14588@shell.boston.redhat.com \
--to=csnook@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sct@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).