[RFC PATCH 2/2] jbd2: avoid clobbering registers with J_ASSERT macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chris Snook <csnook@xxxxxxxxxx>

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

Signed-off-by: Chris Snook <csnook@xxxxxxxxxx>

--- 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-17 01:44:34.000000000 -0400
@@ -255,7 +255,10 @@ typedef struct journal_superblock_s
 #include <linux/fs.h>
 #include <linux/sched.h>
 
+#ifdef CONFIG_JBD2_DEBUG
 #define JBD_ASSERTIONS
+#endif
+
 #ifdef JBD_ASSERTIONS
 #define J_ASSERT(assert)						\
 do {									\
@@ -282,7 +285,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)
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux