optimize branch overlapping test a bit
authorErez_Zadok <ezk@cs.sunysb.edu>
Fri, 4 May 2007 18:44:02 +0000 (14:44 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 24 Nov 2013 07:52:04 +0000 (02:52 -0500)
fs/unionfs/main.c

index 772319025c469a11789846dd8a40576203779c3e..ffcd04074d57682280d311d56d0cd6acecd0183b 100644 (file)
@@ -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);