sunrpc: Add net argument to svc_create_xprt

Signed-off-by: Pavel Emelyanov <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
Pavel Emelyanov 2010-09-29 16:03:50 +04:00 • committed by J. Bruce Fields
commit fc5d00b04a
6 changed files with 12 additions and 11 deletions

View file

@ -1015,12 +1015,12 @@ static ssize_t __write_ports_addxprt(char *buf)
if (err != 0)
return err;
err = svc_create_xprt(nfsd_serv, transport,
err = svc_create_xprt(nfsd_serv, transport, &init_net,
PF_INET, port, SVC_SOCK_ANONYMOUS);
if (err < 0)
goto out_err;
err = svc_create_xprt(nfsd_serv, transport,
err = svc_create_xprt(nfsd_serv, transport, &init_net,
PF_INET6, port, SVC_SOCK_ANONYMOUS);
if (err < 0 && err != -EAFNOSUPPORT)
goto out_close;

View file

@ -16,6 +16,7 @@
#include <linux/lockd/bind.h>
#include <linux/nfsacl.h>
#include <linux/seq_file.h>
#include <net/net_namespace.h>
#include "nfsd.h"
#include "cache.h"
#include "vfs.h"
@ -186,12 +187,12 @@ static int nfsd_init_socks(int port)
if (!list_empty(&nfsd_serv->sv_permsocks))
return 0;
error = svc_create_xprt(nfsd_serv, "udp", PF_INET, port,
error = svc_create_xprt(nfsd_serv, "udp", &init_net, PF_INET, port,
SVC_SOCK_DEFAULTS);
if (error < 0)
return error;
error = svc_create_xprt(nfsd_serv, "tcp", PF_INET, port,
error = svc_create_xprt(nfsd_serv, "tcp", &init_net, PF_INET, port,
SVC_SOCK_DEFAULTS);
if (error < 0)
return error;