commit 5089c67708aedde9b9e6cbcbbb1daadf5ceeb875
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date:   Fri Nov 16 13:46:19 2007 -0500

    Unionfs: display informational messages only if debug is on
    
    This is to avoid filling the console/logs with messages that are primarily
    of debugging use.
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index ea12d6a..5bedbcc 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -461,8 +461,8 @@ int unionfs_file_revalidate(struct file *file, bool 
willwrite)
        if (willwrite && IS_WRITE_FLAG(file->f_flags) &&
            !IS_WRITE_FLAG(unionfs_lower_file(file)->f_flags) &&
            is_robranch(dentry)) {
-               printk(KERN_DEBUG "unionfs: do delay copyup of \"%s\"\n",
-                      dentry->d_name.name);
+               dprintk(KERN_DEBUG "unionfs: do delay copyup of \"%s\"\n",
+                       dentry->d_name.name);
                err = do_delayed_copyup(file);
        }
 
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index c0a0d55..8d7b552 100644
--- a/fs/unionfs/dentry.c
+++ b/fs/unionfs/dentry.c
@@ -62,9 +62,9 @@ static bool __unionfs_d_revalidate_one(struct dentry *dentry,
 
        /* if the dentry is unhashed, do NOT revalidate */
        if (d_deleted(dentry)) {
-               printk(KERN_DEBUG "unionfs: unhashed dentry being "
-                      "revalidated: %*s\n",
-                      dentry->d_name.len, dentry->d_name.name);
+               dprintk(KERN_DEBUG "unionfs: unhashed dentry being "
+                       "revalidated: %*s\n",
+                       dentry->d_name.len, dentry->d_name.name);
                goto out;
        }
 
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index eaa0289..77a9bae 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -538,6 +538,8 @@ static inline struct dentry *__odf_dstack_pop(struct 
dentry_stack *stack)
 
 #ifdef CONFIG_UNION_FS_DEBUG
 
+#define dprintk                printk
+
 /* useful for tracking code reachability */
 #define UDBG printk("DBG:%s:%s:%d\n",__FILE__,__FUNCTION__,__LINE__)
 
@@ -574,6 +576,8 @@ extern void __show_inode_counts(const struct inode *inode,
 
 #else /* not CONFIG_UNION_FS_DEBUG */
 
+#define dprintk(x...)          do { ; } while (0)
+
 /* we leave useful hooks for these check functions throughout the code */
 #define unionfs_check_inode(i)         do { } while(0)
 #define unionfs_check_dentry(d)        do { } while(0)
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to