From: Trond Myklebust Date: Wed, 23 Jul 2014 20:17:40 +0000 (-0400) Subject: nfsd: nfs4_check_fh - make it actually check the filehandle X-Git-Tag: v4.14-rc1~7044^2~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b07c54a4a3802f28b0ed7b40b4341b170a3ef78f;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index ab96718..6ced8d5 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; }