commit 970fc3b4c98b93b1349261cc14103d997d2975de
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date:   Fri Nov 16 13:47:32 2007 -0500

    Unionfs: bugfix in debugging infrastructure
    
    Off-by-one bug fixed in range checking for lower directories.
    Ensure that we PRINT_CALLER before an additional debug message.
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index 9255ebb..34ef190 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -285,17 +285,19 @@ void __unionfs_check_dentry(const struct dentry *dentry,
         * and inode.
         */
        if (S_ISDIR(inode->i_mode))
-               for (bindex = dstart+1; bindex < dend-1; bindex++) {
+               for (bindex = dstart+1; bindex < dend; bindex++) {
                        lower_inode = unionfs_lower_inode_idx(inode, bindex);
                        lower_dentry = unionfs_lower_dentry_idx(dentry,
                                                                bindex);
                        lower_mnt = unionfs_lower_mnt_idx(dentry, bindex);
                        if (!((lower_inode && lower_dentry && lower_mnt) ||
-                             (!lower_inode && !lower_dentry && !lower_mnt)))
+                             (!lower_inode && !lower_dentry && !lower_mnt))) {
+                               PRINT_CALLER();
                                printk(" Cx: lmnt/ldentry/linode=%p:%p:%p "
                                       "bindex=%d dstart/end=%d:%d\n",
                                       lower_mnt, lower_dentry, lower_inode,
                                       bindex, dstart, dend);
+                       }
                }
 }
 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to