GIT: unionfs2-2.6.27.y: Unionfs: minor cleanup in the debugging infrastructure

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


commit 6910924c41ae5da4e9ad3ba5f4332af8700ce92d
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Sat Nov 24 02:09:28 2007 -0500

    Unionfs: minor cleanup in the debugging infrastructure
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index bc221d6..c2b8b58 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -97,24 +97,22 @@ void __unionfs_check_inode(const struct inode *inode,
 					 "istart/end=%d:%d\n", inode,
 					 lower_inode, bindex, istart, iend);
 			}
-		} else {	/* lower_inode == NULL */
-			if (bindex >= istart && bindex <= iend) {
-				/*
-				 * directories can have NULL lower inodes in
-				 * b/t start/end, but NOT if at the
-				 * start/end range.
-				 */
-				if (unlikely(!(S_ISDIR(inode->i_mode) &&
-					       bindex > istart &&
-					       bindex < iend))) {
-					PRINT_CALLER(fname, fxn, line);
-					pr_debug(" Ci7: inode/linode=%p:%p "
-						 "bindex=%d istart/end=%d:%d\n",
-						 inode, lower_inode, bindex,
-						 istart, iend);
-				}
-			}
+			continue;
 		}
+		/* if we get here, then lower_inode == NULL */
+		if (bindex < istart || bindex > iend)
+			continue;
+		/*
+		 * directories can have NULL lower inodes in b/t start/end,
+		 * but NOT if at the start/end range.
+		 */
+		if (unlikely(S_ISDIR(inode->i_mode) &&
+			     bindex > istart && bindex < iend))
+			continue;
+		PRINT_CALLER(fname, fxn, line);
+		pr_debug(" Ci7: inode/linode=%p:%p "
+			 "bindex=%d istart/end=%d:%d\n",
+			 inode, lower_inode, bindex, istart, iend);
 	}
 }
 
@@ -274,24 +272,22 @@ check_inode:
 					 "istart/end=%d:%d\n", dentry,
 					 lower_inode, bindex, istart, iend);
 			}
-		} else {	/* lower_inode == NULL */
-			if (bindex >= istart && bindex <= iend) {
-				/*
-				 * directories can have NULL lower inodes in
-				 * b/t start/end, but NOT if at the
-				 * start/end range.
-				 */
-				if (unlikely(!(S_ISDIR(inode->i_mode) &&
-					       bindex > istart &&
-					       bindex < iend))) {
-					PRINT_CALLER(fname, fxn, line);
-					pr_debug(" CI7: dentry/linode=%p:%p "
-						 "bindex=%d istart/end=%d:%d\n",
-						 dentry, lower_inode, bindex,
-						 istart, iend);
-				}
-			}
+			continue;
 		}
+		/* if we get here, then lower_inode == NULL */
+		if (bindex < istart || bindex > iend)
+			continue;
+		/*
+		 * directories can have NULL lower inodes in b/t start/end,
+		 * but NOT if at the start/end range.
+		 */
+		if (unlikely(S_ISDIR(inode->i_mode) &&
+			     bindex > istart && bindex < iend))
+			continue;
+		PRINT_CALLER(fname, fxn, line);
+		pr_debug(" CI7: dentry/linode=%p:%p "
+			 "bindex=%d istart/end=%d:%d\n",
+			 dentry, lower_inode, bindex, istart, iend);
 	}
 
 	/*


More information about the unionfs-cvs mailing list