[RFC PATCH 1/2] jbd: 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_JBD_DEBUG is set.

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


--- 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)
-
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