提交 4e99a1ff 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 c37dcd33
...@@ -710,6 +710,8 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd) ...@@ -710,6 +710,8 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
{ {
struct nfs_server *server = NFS_SERVER(inode); struct nfs_server *server = NFS_SERVER(inode);
if (test_bit(NFS_INO_MOUNTPOINT, &NFS_I(inode)->flags))
return 0;
if (nd != NULL) { if (nd != NULL) {
/* VFS wants an on-the-wire revalidation */ /* VFS wants an on-the-wire revalidation */
if (nd->flags & LOOKUP_REVAL) if (nd->flags & LOOKUP_REVAL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册