summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorTrond Myklebust2014-07-23 22:17:40 +0200
committerJ. Bruce Fields2014-07-23 22:35:24 +0200
commitb07c54a4a3802f28b0ed7b40b4341b170a3ef78f (patch)
treedae901f71b9a92614c43ccad69edbaed6309542f /fs/nfsd
parentnfsd: Use the filehandle to look up the struct nfs4_file instead of inode (diff)
downloadkernel-qcow2-linux-b07c54a4a3802f28b0ed7b40b4341b170a3ef78f.tar.gz
kernel-qcow2-linux-b07c54a4a3802f28b0ed7b40b4341b170a3ef78f.tar.xz
kernel-qcow2-linux-b07c54a4a3802f28b0ed7b40b4341b170a3ef78f.zip
nfsd: nfs4_check_fh - make it actually check the filehandle
...instead of just checking the inode that corresponds to it. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ab96718df3cc..6ced8d566c0b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3951,7 +3951,7 @@ laundromat_main(struct work_struct *laundry)
static inline __be32 nfs4_check_fh(struct svc_fh *fhp, struct nfs4_ol_stateid *stp)
{
- if (fhp->fh_dentry->d_inode != stp->st_file->fi_inode)
+ if (!nfsd_fh_match(&fhp->fh_handle, &stp->st_file->fi_fhandle))
return nfserr_bad_stateid;
return nfs_ok;
}