summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-06 12:34:59 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-07 14:35:41 -0500
commit4e99a1ff3410c627a428d5ddb6cd2e7bc908a486 (patch)
treead22bf99412be3470ebe3a3dde51172826eb7a1a /fs
parentc37dcd334c0b0a46a90cfa13b9f69e2aaa89bc09 (diff)
downloadlinux-4e99a1ff3410c627a428d5ddb6cd2e7bc908a486.tar.bz2
NFS: Fix dentry revalidation for NFSv4 referrals and mountpoint crossings
As long as the directory contents haven't changed, we should just let the path walk proceed to cross the mountpoint. Apart from being an optimisation in the case of 'nohide' mountpoint traversals, it also fixes an issue with referrals: referral inodes don't have valid filehandles, so calling nfs_revalidate_inode() on them is a bug. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ae04892a5e5d..6cea7479c5b4 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -710,6 +710,8 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
{
struct nfs_server *server = NFS_SERVER(inode);
+ if (test_bit(NFS_INO_MOUNTPOINT, &NFS_I(inode)->flags))
+ return 0;
if (nd != NULL) {
/* VFS wants an on-the-wire revalidation */
if (nd->flags & LOOKUP_REVAL)