aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index b804381d5bee..faa6bfebf258 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -157,6 +157,13 @@ struct sock_xprt {
157 */ 157 */
158 size_t rcvsize, 158 size_t rcvsize,
159 sndsize; 159 sndsize;
160
161 /*
162 * Saved socket callback addresses
163 */
164 void (*old_data_ready)(struct sock *, int);
165 void (*old_state_change)(struct sock *);
166 void (*old_write_space)(struct sock *);
160}; 167};
161 168
162/* 169/*
@@ -536,9 +543,9 @@ static void xs_close(struct rpc_xprt *xprt)
536 transport->sock = NULL; 543 transport->sock = NULL;
537 544
538 sk->sk_user_data = NULL; 545 sk->sk_user_data = NULL;
539 sk->sk_data_ready = xprt->old_data_ready; 546 sk->sk_data_ready = transport->old_data_ready;
540 sk->sk_state_change = xprt->old_state_change; 547 sk->sk_state_change = transport->old_state_change;
541 sk->sk_write_space = xprt->old_write_space; 548 sk->sk_write_space = transport->old_write_space;
542 write_unlock_bh(&sk->sk_callback_lock); 549 write_unlock_bh(&sk->sk_callback_lock);
543 550
544 sk->sk_no_check = 0; 551 sk->sk_no_check = 0;
@@ -1147,9 +1154,9 @@ static void xs_udp_connect_worker(void *args)
1147 write_lock_bh(&sk->sk_callback_lock); 1154 write_lock_bh(&sk->sk_callback_lock);
1148 1155
1149 sk->sk_user_data = xprt; 1156 sk->sk_user_data = xprt;
1150 xprt->old_data_ready = sk->sk_data_ready; 1157 transport->old_data_ready = sk->sk_data_ready;
1151 xprt->old_state_change = sk->sk_state_change; 1158 transport->old_state_change = sk->sk_state_change;
1152 xprt->old_write_space = sk->sk_write_space; 1159 transport->old_write_space = sk->sk_write_space;
1153 sk->sk_data_ready = xs_udp_data_ready; 1160 sk->sk_data_ready = xs_udp_data_ready;
1154 sk->sk_write_space = xs_udp_write_space; 1161 sk->sk_write_space = xs_udp_write_space;
1155 sk->sk_no_check = UDP_CSUM_NORCV; 1162 sk->sk_no_check = UDP_CSUM_NORCV;
@@ -1234,9 +1241,9 @@ static void xs_tcp_connect_worker(void *args)
1234 write_lock_bh(&sk->sk_callback_lock); 1241 write_lock_bh(&sk->sk_callback_lock);
1235 1242
1236 sk->sk_user_data = xprt; 1243 sk->sk_user_data = xprt;
1237 xprt->old_data_ready = sk->sk_data_ready; 1244 transport->old_data_ready = sk->sk_data_ready;
1238 xprt->old_state_change = sk->sk_state_change; 1245 transport->old_state_change = sk->sk_state_change;
1239 xprt->old_write_space = sk->sk_write_space; 1246 transport->old_write_space = sk->sk_write_space;
1240 sk->sk_data_ready = xs_tcp_data_ready; 1247 sk->sk_data_ready = xs_tcp_data_ready;
1241 sk->sk_state_change = xs_tcp_state_change; 1248 sk->sk_state_change = xs_tcp_state_change;
1242 sk->sk_write_space = xs_tcp_write_space; 1249 sk->sk_write_space = xs_tcp_write_space;