From: Erez Zadok Date: Fri, 15 Feb 2008 22:18:48 +0000 (-0500) Subject: Unionfs: use dget_parent in revalidation code X-Git-Tag: unionfs-2.2.4~5 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=d4d119e61428be9a997771986278e59bdea4d4fc;p=unionfs-2.6.30.y.git Unionfs: use dget_parent in revalidation code Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index a956b9437c0..f8f65e1034f 100644 --- a/fs/unionfs/dentry.c +++ b/fs/unionfs/dentry.c @@ -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