Skip to content

Commit

Permalink
nfsd: nfs4_check_fh - make it actually check the filehandle
Browse files Browse the repository at this point in the history
...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>
  • Loading branch information
Trond Myklebust authored and J. Bruce Fields committed Jul 23, 2014
1 parent ca94321 commit b07c54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b07c54a

Please sign in to comment.