Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139532
b: refs/heads/master
c: 482f32e
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 11, 2009
1 parent c86f0f8 commit ca0d5b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: c8485e4d634f6df155040293928707f127f0d06d
refs/heads/master: 482f32e65d31cbf88d08306fa5d397cc945c3c26
12 changes: 5 additions & 7 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,23 +1208,20 @@ static void xs_tcp_state_change(struct sock *sk)
}

/**
* xs_tcp_error_report - callback mainly for catching RST events
* xs_error_report - callback mainly for catching socket errors
* @sk: socket
*/
static void xs_tcp_error_report(struct sock *sk)
static void xs_error_report(struct sock *sk)
{
struct rpc_xprt *xprt;

read_lock(&sk->sk_callback_lock);
if (sk->sk_err != ECONNRESET || sk->sk_state != TCP_ESTABLISHED)
goto out;
if (!(xprt = xprt_from_sock(sk)))
goto out;
dprintk("RPC: %s client %p...\n"
"RPC: error %d\n",
__func__, xprt, sk->sk_err);

xprt_force_disconnect(xprt);
xprt_wake_pending_tasks(xprt, -EAGAIN);
out:
read_unlock(&sk->sk_callback_lock);
}
Expand Down Expand Up @@ -1509,6 +1506,7 @@ static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
sk->sk_user_data = xprt;
sk->sk_data_ready = xs_udp_data_ready;
sk->sk_write_space = xs_udp_write_space;
sk->sk_error_report = xs_error_report;
sk->sk_no_check = UDP_CSUM_NORCV;
sk->sk_allocation = GFP_ATOMIC;

Expand Down Expand Up @@ -1656,7 +1654,7 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
sk->sk_data_ready = xs_tcp_data_ready;
sk->sk_state_change = xs_tcp_state_change;
sk->sk_write_space = xs_tcp_write_space;
sk->sk_error_report = xs_tcp_error_report;
sk->sk_error_report = xs_error_report;
sk->sk_allocation = GFP_ATOMIC;

/* socket options */
Expand Down

0 comments on commit ca0d5b0

Please sign in to comment.