--- 2.2.16/fs/namei.c	Sun Apr  2 21:07:49 2000
+++ /tmp/namei.c	Fri Jul 28 18:59:43 2000
@@ -246,6 +246,7 @@
 	 * FIXME! This could use version numbering or similar to
 	 * avoid unnecessary cache lookups.
 	 */
+ lookup:
 	result = d_lookup(parent, name);
 	if (!result) {
 		struct dentry * dentry = d_alloc(parent, name);
@@ -263,13 +264,14 @@
 
 	/*
 	 * Uhhuh! Nasty case: the cache was re-populated while
-	 * we waited on the semaphore. Need to revalidate, but
-	 * we're going to return this entry regardless (same
-	 * as if it was busy).
+	 * we waited on the semaphore. Need to revalidate.
 	 */
+	if (result->d_op && result->d_op->d_revalidate &&
+	    !result->d_op->d_revalidate(result, flags) && !d_invalidate(result)) {
+		dput(result);
+		goto lookup;
+	}
 	up(&dir->i_sem);
-	if (result->d_op && result->d_op->d_revalidate)
-		result->d_op->d_revalidate(result, flags);
 	return result;
 }