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-Tag: unionfs-2.1.7~5 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=b4f40c5c85f66705d700e5daa4c3877913514613;p=unionfs-2.6.25.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 68692d78580..894bf7cecc0 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;