public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs: don't drop dentry in d_revalidate
@ 2005-10-07 11:21 Miklos Szeredi
  2005-10-07 13:52 ` Trond Myklebust
  2005-10-07 14:38 ` Al Viro
  0 siblings, 2 replies; 4+ messages in thread
From: Miklos Szeredi @ 2005-10-07 11:21 UTC (permalink / raw)
  To: akpm; +Cc: viro, trond.myklebust, linux-kernel

NFS d_revalidate() is doing things that are supposed to be done by
d_invalidate().

Dropping the dentry is especially bad, since it will make
d_invalidate() bypass all checks.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
---

Index: linux/fs/nfs/dir.c
===================================================================
--- linux.orig/fs/nfs/dir.c	2005-10-04 13:59:57.000000000 +0200
+++ linux/fs/nfs/dir.c	2005-10-07 12:53:45.000000000 +0200
@@ -762,12 +762,7 @@ out_zap_parent:
 	if (inode && S_ISDIR(inode->i_mode)) {
 		/* Purge readdir caches. */
 		nfs_zap_caches(inode);
-		/* If we have submounts, don't unhash ! */
-		if (have_submounts(dentry))
-			goto out_valid;
-		shrink_dcache_parent(dentry);
 	}
-	d_drop(dentry);
 	unlock_kernel();
 	dput(parent);
 	return 0;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-07 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-07 11:21 [PATCH] nfs: don't drop dentry in d_revalidate Miklos Szeredi
2005-10-07 13:52 ` Trond Myklebust
2005-10-07 14:04   ` Miklos Szeredi
2005-10-07 14:38 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox