aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/svc.c2
-rw-r--r--fs/nfs/callback.c4
-rw-r--r--fs/nfsd/nfsctl.c4
-rw-r--r--fs/nfsd/nfssvc.c5
-rw-r--r--include/linux/sunrpc/svc_xprt.h4
-rw-r--r--net/sunrpc/svc_xprt.c4
6 files changed, 12 insertions, 11 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index f1bacf1a0391..b13aabc12298 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -206,7 +206,7 @@ static int create_lockd_listener(struct svc_serv *serv, const char *name,
206 206
207 xprt = svc_find_xprt(serv, name, family, 0); 207 xprt = svc_find_xprt(serv, name, family, 0);
208 if (xprt == NULL) 208 if (xprt == NULL)
209 return svc_create_xprt(serv, name, family, port, 209 return svc_create_xprt(serv, name, &init_net, family, port,
210 SVC_SOCK_DEFAULTS); 210 SVC_SOCK_DEFAULTS);
211 svc_xprt_put(xprt); 211 svc_xprt_put(xprt);
212 return 0; 212 return 0;
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index e17b49e2eabd..aeec017fe814 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -109,7 +109,7 @@ nfs4_callback_up(struct svc_serv *serv)
109{ 109{
110 int ret; 110 int ret;
111 111
112 ret = svc_create_xprt(serv, "tcp", PF_INET, 112 ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET,
113 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); 113 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
114 if (ret <= 0) 114 if (ret <= 0)
115 goto out_err; 115 goto out_err;
@@ -117,7 +117,7 @@ nfs4_callback_up(struct svc_serv *serv)
117 dprintk("NFS: Callback listener port = %u (af %u)\n", 117 dprintk("NFS: Callback listener port = %u (af %u)\n",
118 nfs_callback_tcpport, PF_INET); 118 nfs_callback_tcpport, PF_INET);
119 119
120 ret = svc_create_xprt(serv, "tcp", PF_INET6, 120 ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6,
121 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); 121 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS);
122 if (ret > 0) { 122 if (ret > 0) {
123 nfs_callback_tcpport6 = ret; 123 nfs_callback_tcpport6 = ret;
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index b6e192d25633..b81da24b768c 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1015,12 +1015,12 @@ static ssize_t __write_ports_addxprt(char *buf)
1015 if (err != 0) 1015 if (err != 0)
1016 return err; 1016 return err;
1017 1017
1018 err = svc_create_xprt(nfsd_serv, transport, 1018 err = svc_create_xprt(nfsd_serv, transport, &init_net,
1019 PF_INET, port, SVC_SOCK_ANONYMOUS); 1019 PF_INET, port, SVC_SOCK_ANONYMOUS);
1020 if (err < 0) 1020 if (err < 0)
1021 goto out_err; 1021 goto out_err;
1022 1022
1023 err = svc_create_xprt(nfsd_serv, transport, 1023 err = svc_create_xprt(nfsd_serv, transport, &init_net,
1024 PF_INET6, port, SVC_SOCK_ANONYMOUS); 1024 PF_INET6, port, SVC_SOCK_ANONYMOUS);
1025 if (err < 0 && err != -EAFNOSUPPORT) 1025 if (err < 0 && err != -EAFNOSUPPORT)
1026 goto out_close; 1026 goto out_close;
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index e2c43464f237..2bae1d86f5f2 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -16,6 +16,7 @@
16#include <linux/lockd/bind.h> 16#include <linux/lockd/bind.h>
17#include <linux/nfsacl.h> 17#include <linux/nfsacl.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <net/net_namespace.h>
19#include "nfsd.h" 20#include "nfsd.h"
20#include "cache.h" 21#include "cache.h"
21#include "vfs.h" 22#include "vfs.h"
@@ -186,12 +187,12 @@ static int nfsd_init_socks(int port)
186 if (!list_empty(&nfsd_serv->sv_permsocks)) 187 if (!list_empty(&nfsd_serv->sv_permsocks))
187 return 0; 188 return 0;
188 189
189 error = svc_create_xprt(nfsd_serv, "udp", PF_INET, port, 190 error = svc_create_xprt(nfsd_serv, "udp", &init_net, PF_INET, port,
190 SVC_SOCK_DEFAULTS); 191 SVC_SOCK_DEFAULTS);
191 if (error < 0) 192 if (error < 0)
192 return error; 193 return error;
193 194
194 error = svc_create_xprt(nfsd_serv, "tcp", PF_INET, port, 195 error = svc_create_xprt(nfsd_serv, "tcp", &init_net, PF_INET, port,
195 SVC_SOCK_DEFAULTS); 196 SVC_SOCK_DEFAULTS);
196 if (error < 0) 197 if (error < 0)
197 return error; 198 return error;
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index e50e3eca1c7c..646263cf815d 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -74,8 +74,8 @@ int svc_reg_xprt_class(struct svc_xprt_class *);
74void svc_unreg_xprt_class(struct svc_xprt_class *); 74void svc_unreg_xprt_class(struct svc_xprt_class *);
75void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, 75void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *,
76 struct svc_serv *); 76 struct svc_serv *);
77int svc_create_xprt(struct svc_serv *, const char *, const int, 77int svc_create_xprt(struct svc_serv *, const char *, struct net *,
78 const unsigned short, int); 78 const int, const unsigned short, int);
79void svc_xprt_enqueue(struct svc_xprt *xprt); 79void svc_xprt_enqueue(struct svc_xprt *xprt);
80void svc_xprt_received(struct svc_xprt *); 80void svc_xprt_received(struct svc_xprt *);
81void svc_xprt_put(struct svc_xprt *xprt); 81void svc_xprt_put(struct svc_xprt *xprt);
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index f7e8915051b1..d80789a37d88 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -204,8 +204,8 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl,
204} 204}
205 205
206int svc_create_xprt(struct svc_serv *serv, const char *xprt_name, 206int svc_create_xprt(struct svc_serv *serv, const char *xprt_name,
207 const int family, const unsigned short port, 207 struct net *net, const int family,
208 int flags) 208 const unsigned short port, int flags)
209{ 209{
210 struct svc_xprt_class *xcl; 210 struct svc_xprt_class *xcl;
211 211