nfsd: Allow containers to set supported nfs versions
Support use of the --nfs-version/--no-nfs-version arguments to rpc.nfsd in containers. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
029be5d033
commit
e333f3bbef
@@ -1926,6 +1926,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp)
|
||||
struct nfsd4_compound_state *cstate = &resp->cstate;
|
||||
struct svc_fh *current_fh = &cstate->current_fh;
|
||||
struct svc_fh *save_fh = &cstate->save_fh;
|
||||
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
|
||||
__be32 status;
|
||||
|
||||
svcxdr_init_encode(rqstp, resp);
|
||||
@@ -1948,7 +1949,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp)
|
||||
* According to RFC3010, this takes precedence over all other errors.
|
||||
*/
|
||||
status = nfserr_minor_vers_mismatch;
|
||||
if (nfsd_minorversion(args->minorversion, NFSD_TEST) <= 0)
|
||||
if (nfsd_minorversion(nn, args->minorversion, NFSD_TEST) <= 0)
|
||||
goto out;
|
||||
status = nfserr_resource;
|
||||
if (args->opcnt > NFSD_MAX_OPS_PER_COMPOUND)
|
||||
|
Reference in New Issue
Block a user