Commit db6e182c authored by Stanislav Kinsbursky's avatar Stanislav Kinsbursky Committed by J. Bruce Fields

nfsd: pass net to nfsd_init_socks()

Precursor patch. Hard-coded "init_net" will be replaced by proper one in
future.
Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f7fb86c6
...@@ -182,18 +182,18 @@ int nfsd_nrthreads(void) ...@@ -182,18 +182,18 @@ int nfsd_nrthreads(void)
return rv; return rv;
} }
static int nfsd_init_socks(void) static int nfsd_init_socks(struct net *net)
{ {
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, NFS_PORT, error = svc_create_xprt(nfsd_serv, "udp", 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, NFS_PORT, error = svc_create_xprt(nfsd_serv, "tcp", net, PF_INET, NFS_PORT,
SVC_SOCK_DEFAULTS); SVC_SOCK_DEFAULTS);
if (error < 0) if (error < 0)
return error; return error;
...@@ -218,7 +218,7 @@ static int nfsd_startup(int nrservs) ...@@ -218,7 +218,7 @@ static int nfsd_startup(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(); ret = nfsd_init_socks(net);
if (ret) if (ret)
goto out_racache; goto out_racache;
ret = lockd_up(net); ret = lockd_up(net);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment