[PATCH 13/17] Unionfs: use dget_parent in revalidation code

From: Erez Zadok
Date: Sat Feb 16 2008 - 22:02:34 EST


Signed-off-by: Erez Zadok <ezk@xxxxxxxxxxxxx>
---
fs/unionfs/dentry.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
index a956b94..f8f65e1 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
--
1.5.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/