All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Snook <csnook@redhat.com>
To: Stephen Tweedie <sct@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: [RFC PATCH 1/2] jbd: avoid clobbering registers with J_ASSERT macro
Date: Fri, 17 Aug 2007 02:02:35 -0400	[thread overview]
Message-ID: <20070817060235.GA25621@shell.boston.redhat.com> (raw)
In-Reply-To: <46C5380A.8080109@redhat.com>

From: Chris Snook <csnook@redhat.com>

Don't printk before BUG in J_ASSERT unless CONFIG_JBD_DEBUG is set.

Signed-off-by: Chris Snook <csnook@redhat.com>


--- linux-2.6.23-rc3-orig/include/linux/jbd.h	2007-07-08 19:32:17.000000000 -0400
+++ linux-2.6.23-rc3-patch/include/linux/jbd.h	2007-08-17 01:43:34.000000000 -0400
@@ -246,7 +246,10 @@ typedef struct journal_superblock_s
 #include <linux/fs.h>
 #include <linux/sched.h>
 
+#ifdef CONFIG_JBD_DEBUG
 #define JBD_ASSERTIONS
+#endif
+
 #ifdef JBD_ASSERTIONS
 #define J_ASSERT(assert)						\
 do {									\
@@ -273,7 +276,7 @@ void buffer_assertion_failure(struct buf
 #endif
 
 #else
-#define J_ASSERT(assert)	do { } while (0)
+#define J_ASSERT(assert)	BUG_ON(!(assert))
 #endif		/* JBD_ASSERTIONS */
 
 #if defined(JBD_PARANOID_IOFAIL)

  reply	other threads:[~2007-08-17  6:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17  5:54 [RFC PATCH 0/2] avoid clobbering registers with J_ASSERT macro Chris Snook
2007-08-17  6:02 ` Chris Snook [this message]
2007-08-17  6:04 ` [RFC PATCH 2/2] jbd2: " Chris Snook
2007-08-17 20:54 ` [RFC PATCH 0/2] " Andrew Morton
2007-08-20 13:18   ` Chris Snook
2007-08-20 15:22     ` Stephen C. Tweedie
2007-08-20 15:46       ` Matthew Wilcox
2007-08-20 16:19         ` Stephen C. Tweedie

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=20070817060235.GA25621@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.