nfsd: remove redundant "port" argument
"port" in all these functions is always NFS_PORT. nfsd can already be run on a nonstandard port using the "nfsd/portlist" interface. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
39b5530137
commit
38af2cabb6
|
@ -406,7 +406,7 @@ static ssize_t write_threads(struct file *file, char *buf, size_t size)
|
||||||
return rv;
|
return rv;
|
||||||
if (newthreads < 0)
|
if (newthreads < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
rv = nfsd_svc(NFS_PORT, newthreads);
|
rv = nfsd_svc(newthreads);
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
return rv;
|
return rv;
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern const struct seq_operations nfs_exports_op;
|
||||||
/*
|
/*
|
||||||
* Function prototypes.
|
* Function prototypes.
|
||||||
*/
|
*/
|
||||||
int nfsd_svc(unsigned short port, int nrservs);
|
int nfsd_svc(int nrservs);
|
||||||
int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp);
|
int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp);
|
||||||
|
|
||||||
int nfsd_nrthreads(void);
|
int nfsd_nrthreads(void);
|
||||||
|
|
|
@ -183,18 +183,18 @@ int nfsd_nrthreads(void)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nfsd_init_socks(int port)
|
static int nfsd_init_socks(void)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
if (!list_empty(&nfsd_serv->sv_permsocks))
|
if (!list_empty(&nfsd_serv->sv_permsocks))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error = svc_create_xprt(nfsd_serv, "udp", &init_net, PF_INET, port,
|
error = svc_create_xprt(nfsd_serv, "udp", &init_net, PF_INET, NFS_PORT,
|
||||||
SVC_SOCK_DEFAULTS);
|
SVC_SOCK_DEFAULTS);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
error = svc_create_xprt(nfsd_serv, "tcp", &init_net, PF_INET, port,
|
error = svc_create_xprt(nfsd_serv, "tcp", &init_net, PF_INET, NFS_PORT,
|
||||||
SVC_SOCK_DEFAULTS);
|
SVC_SOCK_DEFAULTS);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
@ -204,7 +204,7 @@ static int nfsd_init_socks(int port)
|
||||||
|
|
||||||
static bool nfsd_up = false;
|
static bool nfsd_up = false;
|
||||||
|
|
||||||
static int nfsd_startup(unsigned short port, int nrservs)
|
static int nfsd_startup(int nrservs)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ static int nfsd_startup(unsigned short port, int nrservs)
|
||||||
ret = nfsd_racache_init(2*nrservs);
|
ret = nfsd_racache_init(2*nrservs);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
ret = nfsd_init_socks(port);
|
ret = nfsd_init_socks();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_racache;
|
goto out_racache;
|
||||||
ret = lockd_up(&init_net);
|
ret = lockd_up(&init_net);
|
||||||
|
@ -436,7 +436,7 @@ int nfsd_set_nrthreads(int n, int *nthreads)
|
||||||
* this is the first time nrservs is nonzero.
|
* this is the first time nrservs is nonzero.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
nfsd_svc(unsigned short port, int nrservs)
|
nfsd_svc(int nrservs)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
bool nfsd_up_before;
|
bool nfsd_up_before;
|
||||||
|
@ -458,7 +458,7 @@ nfsd_svc(unsigned short port, int nrservs)
|
||||||
|
|
||||||
nfsd_up_before = nfsd_up;
|
nfsd_up_before = nfsd_up;
|
||||||
|
|
||||||
error = nfsd_startup(port, nrservs);
|
error = nfsd_startup(nrservs);
|
||||||
if (error)
|
if (error)
|
||||||
goto out_destroy;
|
goto out_destroy;
|
||||||
error = svc_set_num_threads(nfsd_serv, NULL, nrservs);
|
error = svc_set_num_threads(nfsd_serv, NULL, nrservs);
|
||||||
|
|
Loading…
Reference in New Issue