diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-04-09 11:46:19 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2019-04-24 09:46:35 -0400 |
commit | e333f3bbefe3e25e2bcff58063f920a2eaba224b (patch) | |
tree | dcc70057be9950c50a87f76c8b31468b4fa1be6f /fs/nfsd/nfs4proc.c | |
parent | 029be5d03357f0797d1b9a6b5aab5e7e311fd76a (diff) |
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>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 0cfd257ffdaf..b0ad72d701b1 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -1926,6 +1926,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp) | |||
1926 | struct nfsd4_compound_state *cstate = &resp->cstate; | 1926 | struct nfsd4_compound_state *cstate = &resp->cstate; |
1927 | struct svc_fh *current_fh = &cstate->current_fh; | 1927 | struct svc_fh *current_fh = &cstate->current_fh; |
1928 | struct svc_fh *save_fh = &cstate->save_fh; | 1928 | struct svc_fh *save_fh = &cstate->save_fh; |
1929 | struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); | ||
1929 | __be32 status; | 1930 | __be32 status; |
1930 | 1931 | ||
1931 | svcxdr_init_encode(rqstp, resp); | 1932 | svcxdr_init_encode(rqstp, resp); |
@@ -1948,7 +1949,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp) | |||
1948 | * According to RFC3010, this takes precedence over all other errors. | 1949 | * According to RFC3010, this takes precedence over all other errors. |
1949 | */ | 1950 | */ |
1950 | status = nfserr_minor_vers_mismatch; | 1951 | status = nfserr_minor_vers_mismatch; |
1951 | if (nfsd_minorversion(args->minorversion, NFSD_TEST) <= 0) | 1952 | if (nfsd_minorversion(nn, args->minorversion, NFSD_TEST) <= 0) |
1952 | goto out; | 1953 | goto out; |
1953 | status = nfserr_resource; | 1954 | status = nfserr_resource; |
1954 | if (args->opcnt > NFSD_MAX_OPS_PER_COMPOUND) | 1955 | if (args->opcnt > NFSD_MAX_OPS_PER_COMPOUND) |