login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <linux-kernel@...>, <linux-fsdevel@...>, <viro@...>, <hch@...>, Erez Zadok <ezk@...>
Date: Saturday, February 16, 2008 - 10:57 pm

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 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-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PULL -mm] 00/17 Unionfs updates/fixes/cleanups, Erez Zadok, (Sat Feb 16, 10:57 pm)
[PATCH 05/17] Unionfs: initialize path_save variable, Erez Zadok, (Sat Feb 16, 10:57 pm)
[PATCH 13/17] Unionfs: use dget_parent in revalidation code, Erez Zadok, (Sat Feb 16, 10:57 pm)
[PATCH 16/17] Unionfs: use the new path_put, Erez Zadok, (Sat Feb 16, 10:57 pm)
[PATCH 10/17] Unionfs: factor out revalidation routine, Erez Zadok, (Sat Feb 16, 10:57 pm)
[PATCH 07/17] Unionfs: follow_link locking fixes, Erez Zadok, (Sat Feb 16, 10:57 pm)
speck-geostationary