Unionfs: use dget_parent in revalidation code
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 15 Feb 2008 22:18:48 +0000 (17:18 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:25:59 +0000 (22:25 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dentry.c

index a956b9437c0b8c835c3c86cd3785ac186198add4..f8f65e1034fa3271274916156982cfb48c0c1568 100644 (file)
@@ -410,15 +410,10 @@ bool __unionfs_d_revalidate_chain(struct dentry *dentry, struct nameidata *nd,
                goto out;
        }
 
-       /*
-        * lock all dentries in chain, in child to parent order.
-        * if failed, then sleep for a little, then retry.
-        */
-       dtmp = dentry->d_parent;
-       for (i = chain_len-1; i >= 0; i--) {
-               chain[i] = dget(dtmp);
-               dtmp = dtmp->d_parent;
-       }
+       /* grab all dentries in chain, in child to parent order */
+       dtmp = dentry;
+       for (i = chain_len-1; i >= 0; i--)
+               dtmp = chain[i] = dget_parent(dtmp);
 
        /*
         * call __unionfs_d_revalidate_one() on each dentry, but in parent