Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6f38c74f5a01c7bccf58f9d7ee47ea24fb45752f
Commit:     6f38c74f5a01c7bccf58f9d7ee47ea24fb45752f
Parent:     a7fa2baf8e2a6c0eb0a21f75e919c226179e8ff4
Author:     Jose R. Santos <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 18:38:25 2007 -0400
Committer:  Theodore Ts'o <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 18:49:59 2007 -0400

    JBD2: debug code cleanup.
    
    Mostly stolen from akpm's JBD cleanup patch.
    
    - use `#ifdef foo' instead of `#if defined(foo)'
    
    - Make journal_enable_debug __read_mostly just for the heck of it
    
    - Make jbd_debugfs_dir and jbd_debug static
    
    - debugfs_remove(NULL) is legal: remove unneeded tests
    
    - remove unnecessary empty loops
    
    Signed-off-by: Jose R. Santos <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
 fs/jbd2/journal.c |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index ff07bff..6ddc553 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1864,16 +1864,14 @@ void jbd2_journal_put_journal_head(struct journal_head 
*jh)
 /*
  * debugfs tunables
  */
-#if defined(CONFIG_JBD2_DEBUG)
-u8 jbd2_journal_enable_debug;
+#ifdef CONFIG_JBD2_DEBUG
+u8 jbd2_journal_enable_debug __read_mostly;
 EXPORT_SYMBOL(jbd2_journal_enable_debug);
-#endif
-
-#if defined(CONFIG_JBD2_DEBUG) && defined(CONFIG_DEBUG_FS)
 
 #define JBD2_DEBUG_NAME "jbd2-debug"
 
-struct dentry *jbd2_debugfs_dir, *jbd2_debug;
+static struct dentry *jbd2_debugfs_dir;
+static struct dentry *jbd2_debug;
 
 static void __init jbd2_create_debugfs_entry(void)
 {
@@ -1886,24 +1884,18 @@ static void __init jbd2_create_debugfs_entry(void)
 
 static void __exit jbd2_remove_debugfs_entry(void)
 {
-       if (jbd2_debug)
-               debugfs_remove(jbd2_debug);
-       if (jbd2_debugfs_dir)
-               debugfs_remove(jbd2_debugfs_dir);
+       debugfs_remove(jbd2_debug);
+       debugfs_remove(jbd2_debugfs_dir);
 }
 
 #else
 
 static void __init jbd2_create_debugfs_entry(void)
 {
-       do {
-       } while (0);
 }
 
 static void __exit jbd2_remove_debugfs_entry(void)
 {
-       do {
-       } while (0);
 }
 
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to