提交 b07c54a4 编写于 作者: T Trond Myklebust 提交者: J. Bruce Fields

nfsd: nfs4_check_fh - make it actually check the filehandle

...instead of just checking the inode that corresponds to it.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: NJeff Layton <jlayton@primarydata.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 ca943217
...@@ -3951,7 +3951,7 @@ laundromat_main(struct work_struct *laundry) ...@@ -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) 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 nfserr_bad_stateid;
return nfs_ok; return nfs_ok;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册