diff options
author | Manoj Naik <manoj@almaden.ibm.com> | 2006-06-09 09:34:29 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:34:29 -0400 |
commit | 6b97fd3da1eab2cc490cfe884c7d4956522eaf8b (patch) | |
tree | 055f5f603101a15f783ae52081e4714ddc3edc96 /fs/nfs/inode.c | |
parent | 9cdb3883c38f883436a84c2353a4cf964ff890a2 (diff) |
NFSv4: Follow a referral
Respond to a moved error on NFS lookup by setting up the referral.
Note: We don't actually follow the referral during lookup/getattr, but
later when we detect fsid mismatch in inode revalidation (similar to the
processing done for cloning submounts). Referrals will have fake attributes
until they are actually followed or traversed.
Signed-off-by: Manoj Naik <manoj@almaden.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 0d8302e59d69..ee13cb01b56e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -888,7 +888,10 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) | |||
888 | set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); | 888 | set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); |
889 | /* Deal with crossing mountpoints */ | 889 | /* Deal with crossing mountpoints */ |
890 | if (!nfs_fsid_equal(&NFS_SB(sb)->fsid, &fattr->fsid)) { | 890 | if (!nfs_fsid_equal(&NFS_SB(sb)->fsid, &fattr->fsid)) { |
891 | inode->i_op = &nfs_mountpoint_inode_operations; | 891 | if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) |
892 | inode->i_op = &nfs_referral_inode_operations; | ||
893 | else | ||
894 | inode->i_op = &nfs_mountpoint_inode_operations; | ||
892 | inode->i_fop = NULL; | 895 | inode->i_fop = NULL; |
893 | } | 896 | } |
894 | } else if (S_ISLNK(inode->i_mode)) | 897 | } else if (S_ISLNK(inode->i_mode)) |