more (forgotten) cleanups to partial_lookup.
authorErez_Zadok <ezk@cs.sunysb.edu>
Tue, 29 May 2007 01:15:43 +0000 (21:15 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:02:40 +0000 (19:02 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/lookup.c

index e6827faa8478f10c12707620973bc5c6890041e8..c42778011a0e8a86e7b0481cb5f9ca0551b10259 100644 (file)
@@ -375,7 +375,9 @@ int unionfs_partial_lookup(struct dentry *dentry)
                err = PTR_ERR(tmp);
                goto out;
        }
-       err = 0;
+       if (tmp)
+               goto out;
+
        if (UNIONFS_D(dentry) && !UNIONFS_D(dentry)->odf.dentry) {
                tmp = unionfs_lower_dentry_idx(dentry, 0);
                if (dentry->d_inode || (tmp && tmp->d_inode)) {
@@ -385,10 +387,11 @@ int unionfs_partial_lookup(struct dentry *dentry)
                        BUG_ON(!UNIONFS_D(dentry)->odf.dentry);
                }
        }
+       err = 0;
 
+out:
        /* need to change the interface */
        BUG_ON(tmp != dentry);
-out:
        return err;
 }