diff options
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 63ec116b4dd4..fa6d7ca2c851 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -177,6 +177,7 @@ static DEFINE_MUTEX(rpcb_create_local_mutex); | |||
177 | static int rpcb_create_local(void) | 177 | static int rpcb_create_local(void) |
178 | { | 178 | { |
179 | struct rpc_create_args args = { | 179 | struct rpc_create_args args = { |
180 | .net = &init_net, | ||
180 | .protocol = XPRT_TRANSPORT_TCP, | 181 | .protocol = XPRT_TRANSPORT_TCP, |
181 | .address = (struct sockaddr *)&rpcb_inaddr_loopback, | 182 | .address = (struct sockaddr *)&rpcb_inaddr_loopback, |
182 | .addrsize = sizeof(rpcb_inaddr_loopback), | 183 | .addrsize = sizeof(rpcb_inaddr_loopback), |
@@ -229,6 +230,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr, | |||
229 | size_t salen, int proto, u32 version) | 230 | size_t salen, int proto, u32 version) |
230 | { | 231 | { |
231 | struct rpc_create_args args = { | 232 | struct rpc_create_args args = { |
233 | .net = &init_net, | ||
232 | .protocol = proto, | 234 | .protocol = proto, |
233 | .address = srvaddr, | 235 | .address = srvaddr, |
234 | .addrsize = salen, | 236 | .addrsize = salen, |
@@ -248,7 +250,7 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr, | |||
248 | ((struct sockaddr_in6 *)srvaddr)->sin6_port = htons(RPCBIND_PORT); | 250 | ((struct sockaddr_in6 *)srvaddr)->sin6_port = htons(RPCBIND_PORT); |
249 | break; | 251 | break; |
250 | default: | 252 | default: |
251 | return NULL; | 253 | return ERR_PTR(-EAFNOSUPPORT); |
252 | } | 254 | } |
253 | 255 | ||
254 | return rpc_create(&args); | 256 | return rpc_create(&args); |