summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-06-13 18:25:56 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-06-15 11:24:29 -0400
commit533eb4611c9eea53072eb6a61d5a6393b6a77ed7 (patch)
treeadb2b4cbfe85689979d2cf971b65ebcd0d383d56 /fs/nfs/inode.c
parent1d92a08da23848a38eece4df7eaa4e8ec0e6c699 (diff)
downloadop-kernel-dev-533eb4611c9eea53072eb6a61d5a6393b6a77ed7.zip
op-kernel-dev-533eb4611c9eea53072eb6a61d5a6393b6a77ed7.tar.gz
NFSv4.1: allow nfs_fhget to succeed with mounted on fileid
Commit 28331a46d88459788c8fca72dbb0415cd7f514c9 "Ensure we request the ordinary fileid when doing readdirplus" changed the meaning of NFS_ATTR_FATTR_FILEID which used to be set when FATTR4_WORD1_MOUNTED_ON_FILED was requested. Allow nfs_fhget to succeed with only a mounted on fileid when crossing a mountpoint or a referral. Ask for the fileid of the absent file system if mounted_on_fileid is not supported. Signed-off-by: Andy Adamson <andros@netapp.com> cc:stable@kernel.org [2.6.39] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3f1eb81..6f4850d 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -256,7 +256,8 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
nfs_attr_check_mountpoint(sb, fattr);
- if ((fattr->valid & NFS_ATTR_FATTR_FILEID) == 0 && (fattr->valid & NFS_ATTR_FATTR_MOUNTPOINT) == 0)
+ if (((fattr->valid & NFS_ATTR_FATTR_FILEID) == 0) &&
+ !nfs_attr_use_mounted_on_fileid(fattr))
goto out_no_inode;
if ((fattr->valid & NFS_ATTR_FATTR_TYPE) == 0)
goto out_no_inode;
OpenPOWER on IntegriCloud