[PATCH 5/9] Unionfs: don't bother validating dentry if it has no lower branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Erez Zadok <[email protected]>
---
 fs/unionfs/debug.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index 68692d7..894bf7c 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;
-- 
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux