mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:50:58 +07:00
sunrpc: Add net argument to svc_create_xprt
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
e204e621b4
commit
fc5d00b04a
@ -206,7 +206,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,
|
||||
|
||||
xprt = svc_find_xprt(serv, name, family, 0);
|
||||
if (xprt == NULL)
|
||||
return svc_create_xprt(serv, name, family, port,
|
||||
return svc_create_xprt(serv, name, &init_net, family, port,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
svc_xprt_put(xprt);
|
||||
return 0;
|
||||
|
@ -109,7 +109,7 @@ nfs4_callback_up(struct svc_serv *serv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = svc_create_xprt(serv, "tcp", PF_INET,
|
||||
ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET,
|
||||
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
|
||||
if (ret <= 0)
|
||||
goto out_err;
|
||||
@ -117,7 +117,7 @@ nfs4_callback_up(struct svc_serv *serv)
|
||||
dprintk("NFS: Callback listener port = %u (af %u)\n",
|
||||
nfs_callback_tcpport, PF_INET);
|
||||
|
||||
ret = svc_create_xprt(serv, "tcp", PF_INET6,
|
||||
ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6,
|
||||
nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
|
||||
if (ret > 0) {
|
||||
nfs_callback_tcpport6 = ret;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -74,8 +74,8 @@ int svc_reg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_unreg_xprt_class(struct svc_xprt_class *);
|
||||
void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *,
|
||||
struct svc_serv *);
|
||||
int svc_create_xprt(struct svc_serv *, const char *, const int,
|
||||
const unsigned short, int);
|
||||
int svc_create_xprt(struct svc_serv *, const char *, struct net *,
|
||||
const int, const unsigned short, int);
|
||||
void svc_xprt_enqueue(struct svc_xprt *xprt);
|
||||
void svc_xprt_received(struct svc_xprt *);
|
||||
void svc_xprt_put(struct svc_xprt *xprt);
|
||||
|
@ -204,8 +204,8 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl,
|
||||
}
|
||||
|
||||
int svc_create_xprt(struct svc_serv *serv, const char *xprt_name,
|
||||
const int family, const unsigned short port,
|
||||
int flags)
|
||||
struct net *net, const int family,
|
||||
const unsigned short port, int flags)
|
||||
{
|
||||
struct svc_xprt_class *xcl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user