lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Nov 2007 11:44:01 -0500
From:	Erez Zadok <ezk@...sunysb.edu>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	viro@....linux.org.uk, hch@...radead.org,
	Erez Zadok <ezk@...sunysb.edu>
Subject: [PATCH 04/16] Unionfs: minor cleanup in the debugging infrastructure

Signed-off-by: Erez Zadok <ezk@...sunysb.edu>
---
 fs/unionfs/debug.c |   64 ++++++++++++++++++++++++---------------------------
 1 files changed, 30 insertions(+), 34 deletions(-)

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);
 	}
 
 	/*
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ