From: Erez Zadok Date: Thu, 1 Nov 2007 04:41:03 +0000 (-0400) Subject: Unionfs: don't bother validating inode if it has no lower branches X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=a6ac7364bda8f2b50fa178b496c8f5ee6422996f;p=unionfs-3.17.y.git Unionfs: don't bother validating inode if it has no lower branches Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index 894bf7cecc03..0066ccd9ec74 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))) {