Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42548
b: refs/heads/master
c: 314dfd7
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Dec 6, 2006
1 parent f2d6b23 commit 528ca99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c6e066ec29290bf062f5bff2984bad9be5809c7
refs/heads/master: 314dfd7987c71d7ba0c43ac3bf3d243c102ce025
6 changes: 0 additions & 6 deletions trunk/include/linux/sunrpc/xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <linux/sunrpc/xdr.h>
#include <linux/sunrpc/msg_prot.h>

#include <net/sock.h>

extern unsigned int xprt_udp_slot_table_entries;
extern unsigned int xprt_tcp_slot_table_entries;

Expand Down Expand Up @@ -191,10 +189,6 @@ struct rpc_xprt {
bklog_u; /* backlog queue utilization */
} stat;

void (*old_data_ready)(struct sock *, int);
void (*old_state_change)(struct sock *);
void (*old_write_space)(struct sock *);

char * address_strings[RPC_DISPLAY_MAX];
};

Expand Down
25 changes: 16 additions & 9 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ struct sock_xprt {
*/
size_t rcvsize,
sndsize;

/*
* Saved socket callback addresses
*/
void (*old_data_ready)(struct sock *, int);
void (*old_state_change)(struct sock *);
void (*old_write_space)(struct sock *);
};

/*
Expand Down Expand Up @@ -536,9 +543,9 @@ static void xs_close(struct rpc_xprt *xprt)
transport->sock = NULL;

sk->sk_user_data = NULL;
sk->sk_data_ready = xprt->old_data_ready;
sk->sk_state_change = xprt->old_state_change;
sk->sk_write_space = xprt->old_write_space;
sk->sk_data_ready = transport->old_data_ready;
sk->sk_state_change = transport->old_state_change;
sk->sk_write_space = transport->old_write_space;
write_unlock_bh(&sk->sk_callback_lock);

sk->sk_no_check = 0;
Expand Down Expand Up @@ -1147,9 +1154,9 @@ static void xs_udp_connect_worker(void *args)
write_lock_bh(&sk->sk_callback_lock);

sk->sk_user_data = xprt;
xprt->old_data_ready = sk->sk_data_ready;
xprt->old_state_change = sk->sk_state_change;
xprt->old_write_space = sk->sk_write_space;
transport->old_data_ready = sk->sk_data_ready;
transport->old_state_change = sk->sk_state_change;
transport->old_write_space = sk->sk_write_space;
sk->sk_data_ready = xs_udp_data_ready;
sk->sk_write_space = xs_udp_write_space;
sk->sk_no_check = UDP_CSUM_NORCV;
Expand Down Expand Up @@ -1234,9 +1241,9 @@ static void xs_tcp_connect_worker(void *args)
write_lock_bh(&sk->sk_callback_lock);

sk->sk_user_data = xprt;
xprt->old_data_ready = sk->sk_data_ready;
xprt->old_state_change = sk->sk_state_change;
xprt->old_write_space = sk->sk_write_space;
transport->old_data_ready = sk->sk_data_ready;
transport->old_state_change = sk->sk_state_change;
transport->old_write_space = sk->sk_write_space;
sk->sk_data_ready = xs_tcp_data_ready;
sk->sk_state_change = xs_tcp_state_change;
sk->sk_write_space = xs_tcp_write_space;
Expand Down

0 comments on commit 528ca99

Please sign in to comment.