aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfsctl.c4
-rw-r--r--fs/nfsd/nfsd.h2
-rw-r--r--fs/nfsd/nfssvc.c3
3 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index ae1d14313ef8..68e229cdfd63 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -396,6 +396,8 @@ static ssize_t write_threads(struct file *file, char *buf, size_t size)
396{ 396{
397 char *mesg = buf; 397 char *mesg = buf;
398 int rv; 398 int rv;
399 struct net *net = &init_net;
400
399 if (size > 0) { 401 if (size > 0) {
400 int newthreads; 402 int newthreads;
401 rv = get_int(&mesg, &newthreads); 403 rv = get_int(&mesg, &newthreads);
@@ -403,7 +405,7 @@ static ssize_t write_threads(struct file *file, char *buf, size_t size)
403 return rv; 405 return rv;
404 if (newthreads < 0) 406 if (newthreads < 0)
405 return -EINVAL; 407 return -EINVAL;
406 rv = nfsd_svc(newthreads); 408 rv = nfsd_svc(newthreads, net);
407 if (rv < 0) 409 if (rv < 0)
408 return rv; 410 return rv;
409 } else 411 } else
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index acddf71abd51..8226c1b02558 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -65,7 +65,7 @@ extern const struct seq_operations nfs_exports_op;
65/* 65/*
66 * Function prototypes. 66 * Function prototypes.
67 */ 67 */
68int nfsd_svc(int nrservs); 68int nfsd_svc(int nrservs, struct net *net);
69int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp); 69int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp);
70 70
71int nfsd_nrthreads(void); 71int nfsd_nrthreads(void);
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 6448391cde54..f199b537cc81 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -442,11 +442,10 @@ int nfsd_set_nrthreads(int n, int *nthreads)
442 * this is the first time nrservs is nonzero. 442 * this is the first time nrservs is nonzero.
443 */ 443 */
444int 444int
445nfsd_svc(int nrservs) 445nfsd_svc(int nrservs, struct net *net)
446{ 446{
447 int error; 447 int error;
448 bool nfsd_up_before; 448 bool nfsd_up_before;
449 struct net *net = &init_net;
450 449
451 mutex_lock(&nfsd_mutex); 450 mutex_lock(&nfsd_mutex);
452 dprintk("nfsd: creating service\n"); 451 dprintk("nfsd: creating service\n");