From: Erez Zadok Date: Wed, 17 Oct 2007 21:35:02 +0000 (-0400) Subject: Unionfs: don't bother validating dentry if it has no lower branches X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=4da4caa0c0c8932fbc86ba43a3f0b2b0324f6565;p=unionfs-3.4.y.git Unionfs: don't bother validating dentry if it has no lower branches Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index 68692d785805..894bf7cecc03 100644 --- a/fs/unionfs/debug.c +++ b/fs/unionfs/debug.c @@ -132,6 +132,9 @@ void __unionfs_check_dentry(const struct dentry *dentry, inode = dentry->d_inode; dstart = dbstart(dentry); dend = dbend(dentry); + /* don't check dentry/mnt if no lower branches */ + if (dstart < 0 && dend < 0) + goto check_inode; BUG_ON(dstart > dend); if (unlikely((dstart == -1 && dend != -1) || @@ -212,6 +215,7 @@ void __unionfs_check_dentry(const struct dentry *dentry, } } +check_inode: /* for inodes now */ if (!inode) return;