aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/namespace.c')
-rw-r--r--fs/nfs/namespace.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index e426516c1116..8ca44b7b25c3 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -58,7 +58,10 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
58 if (err != 0) 58 if (err != 0)
59 goto out_err; 59 goto out_err;
60 60
61 mnt = nfs_do_submount(nd->mnt, nd->dentry, &fh, &fattr); 61 if (fattr.valid & NFS_ATTR_FATTR_V4_REFERRAL)
62 mnt = nfs_do_refmount(nd->mnt, nd->dentry);
63 else
64 mnt = nfs_do_submount(nd->mnt, nd->dentry, &fh, &fattr);
62 err = PTR_ERR(mnt); 65 err = PTR_ERR(mnt);
63 if (IS_ERR(mnt)) 66 if (IS_ERR(mnt))
64 goto out_err; 67 goto out_err;
@@ -94,6 +97,10 @@ struct inode_operations nfs_mountpoint_inode_operations = {
94 .getattr = nfs_getattr, 97 .getattr = nfs_getattr,
95}; 98};
96 99
100struct inode_operations nfs_referral_inode_operations = {
101 .follow_link = nfs_follow_mountpoint,
102};
103
97static void nfs_expire_automounts(void *data) 104static void nfs_expire_automounts(void *data)
98{ 105{
99 struct list_head *list = (struct list_head *)data; 106 struct list_head *list = (struct list_head *)data;