GIT: unionfs2-2.6.27.y: Unionfs: don't bother validating inode if it has no lower branches

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


commit 540a2df02039848ce3d2c279706837197015c19a
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Thu Nov 1 00:41:03 2007 -0400

    Unionfs: don't bother validating inode if it has no lower branches
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

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))) {


More information about the unionfs-cvs mailing list