]> Git Repo - linux.git/commit
NFSD: Avoid using rqstp->rq_vers in nfsd_set_fh_dentry()
authorChuck Lever <[email protected]>
Thu, 5 Sep 2024 19:09:40 +0000 (15:09 -0400)
committerAnna Schumaker <[email protected]>
Mon, 23 Sep 2024 19:03:30 +0000 (15:03 -0400)
commit7c0b07b49b2da108438e2504452effe0e6cbb764
tree71f61d67ee5f847f95985c42ee2212f0470e9c6d
parentb0d87dbd8bd311d4126f5b34a8494043c487695f
NFSD: Avoid using rqstp->rq_vers in nfsd_set_fh_dentry()

Currently, fh_verify() makes some daring assumptions about which
version of file handle the caller wants, based on the things it can
find in the passed-in rqstp. The about-to-be-introduced LOCALIO use
case sometimes has no svc_rqst context, so this logic won't work in
that case.

Instead, examine the passed-in file handle. It's .max_size field
should carry information to allow nfsd_set_fh_dentry() to initialize
the file handle appropriately.

The file handle used by lockd and the one created by write_filehandle
never need any of the version-specific fields (which affect things
like write and getattr requests and pre/post attributes).

Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
fs/nfsd/nfsfh.c
This page took 0.054246 seconds and 4 git commands to generate.