GIT: unionfs2-2.6.27.y: optimize branch overlapping test a bit

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


commit 00f07fa04cdcc7e7c504ef6beb7d756f3b33928a
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date:   Fri May 4 14:44:02 2007 -0400

    optimize branch overlapping test a bit

diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index 7723190..ffcd040 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -366,10 +366,9 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
 	 * branch-overlapping test.
 	 */
 	for (i = 0; i < branches; i++) {
+		dent1 = hidden_root_info->lower_paths[i].dentry;
 		for (j = i + 1; j < branches; j++) {
-			dent1 = hidden_root_info->lower_paths[i].dentry;
 			dent2 = hidden_root_info->lower_paths[j].dentry;
-
 			if (is_branch_overlap(dent1, dent2)) {
 				printk(KERN_WARNING "unionfs: branches %d and "
 				       "%d overlap\n", i, j);


More information about the unionfs-cvs mailing list