GIT: unionfs2-2.6.27.y: Unionfs: bugfix in debugging infrastructure

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:38 EDT 2010


commit 7226dee1bbd7416494ea79d9f94b4488818e663f
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date:   Sun Jun 17 22:29:40 2007 -0400

    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 <ezk at cs.sunysb.edu>

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);
+			}
 		}
 }
 


More information about the unionfs-cvs mailing list