[PATCH 6/8] Unionfs: don't bother validating inode if it has no lower branches

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Erez Zadok
Date: Friday, November 2, 2007 - 6:22 pm

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

diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index 894bf7c..0066ccd 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -49,6 +49,9 @@ void __unionfs_check_inode(const struct inode *inode,
 	sb = inode->i_sb;
 	istart = ibstart(inode);
 	iend = ibend(inode);
+	/* don't check inode if no lower branches */
+	if (istart < 0 && iend < 0)
+		return;
 	if (unlikely(istart > iend)) {
 		PRINT_CALLER(fname, fxn, line);
 		pr_debug(" Ci0: inode=%p istart/end=%d:%d\n",
@@ -221,6 +224,9 @@ check_inode:
 		return;
 	istart = ibstart(inode);
 	iend = ibend(inode);
+	/* don't check inode if no lower branches */
+	if (istart < 0 && iend < 0)
+		return;
 	BUG_ON(istart > iend);
 	if (unlikely((istart == -1 && iend != -1) ||
 		     (istart != -1 && iend == -1))) {
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL -mm] 0/8 Unionfs updates/cleanups/fixes, Erez Zadok, (Fri Nov 2, 6:22 pm)
[PATCH 3/8] Unionfs: update usage.txt documentation, Erez Zadok, (Fri Nov 2, 6:22 pm)
[PATCH 4/8] Unionfs: mmap updates, Erez Zadok, (Fri Nov 2, 6:22 pm)
[PATCH 6/8] Unionfs: don't bother validating inode if it h ..., Erez Zadok, (Fri Nov 2, 6:22 pm)