diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 71bed1c1c77a..277909e651ed 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -739,7 +739,8 @@ static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv) | |||
739 | { | 739 | { |
740 | int err, level, optname, one = 1; | 740 | int err, level, optname, one = 1; |
741 | 741 | ||
742 | svc_xprt_init(&svc_udp_class, &svsk->sk_xprt, serv); | 742 | svc_xprt_init(sock_net(svsk->sk_sock->sk), &svc_udp_class, |
743 | &svsk->sk_xprt, serv); | ||
743 | clear_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags); | 744 | clear_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags); |
744 | svsk->sk_sk->sk_data_ready = svc_udp_data_ready; | 745 | svsk->sk_sk->sk_data_ready = svc_udp_data_ready; |
745 | svsk->sk_sk->sk_write_space = svc_write_space; | 746 | svsk->sk_sk->sk_write_space = svc_write_space; |
@@ -1343,7 +1344,8 @@ static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) | |||
1343 | { | 1344 | { |
1344 | struct sock *sk = svsk->sk_sk; | 1345 | struct sock *sk = svsk->sk_sk; |
1345 | 1346 | ||
1346 | svc_xprt_init(&svc_tcp_class, &svsk->sk_xprt, serv); | 1347 | svc_xprt_init(sock_net(svsk->sk_sock->sk), &svc_tcp_class, |
1348 | &svsk->sk_xprt, serv); | ||
1347 | set_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags); | 1349 | set_bit(XPT_CACHE_AUTH, &svsk->sk_xprt.xpt_flags); |
1348 | if (sk->sk_state == TCP_LISTEN) { | 1350 | if (sk->sk_state == TCP_LISTEN) { |
1349 | dprintk("setting up TCP socket for listening\n"); | 1351 | dprintk("setting up TCP socket for listening\n"); |
@@ -1659,7 +1661,7 @@ static struct svc_xprt *svc_bc_create_socket(struct svc_serv *serv, | |||
1659 | return ERR_PTR(-ENOMEM); | 1661 | return ERR_PTR(-ENOMEM); |
1660 | 1662 | ||
1661 | xprt = &svsk->sk_xprt; | 1663 | xprt = &svsk->sk_xprt; |
1662 | svc_xprt_init(&svc_tcp_bc_class, xprt, serv); | 1664 | svc_xprt_init(net, &svc_tcp_bc_class, xprt, serv); |
1663 | 1665 | ||
1664 | serv->sv_bc_xprt = xprt; | 1666 | serv->sv_bc_xprt = xprt; |
1665 | 1667 | ||