Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127483
b: refs/heads/master
c: 69b6ba3
h: refs/heads/master
i:
  127481: a46e9ea
  127479: 688eef0
v: v3
  • Loading branch information
Trond Myklebust authored and J. Bruce Fields committed Jan 6, 2009
1 parent 9cbac8b commit 535f159
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 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: 262a09823bb07c6aafb6c1d312cde613d0b90c85
refs/heads/master: 69b6ba3712b796a66595cfaf0a5ab4dfe1cf964a
21 changes: 20 additions & 1 deletion trunk/net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ static void svc_udp_data_ready(struct sock *, int);
static int svc_udp_recvfrom(struct svc_rqst *);
static int svc_udp_sendto(struct svc_rqst *);
static void svc_sock_detach(struct svc_xprt *);
static void svc_tcp_sock_detach(struct svc_xprt *);
static void svc_sock_free(struct svc_xprt *);

static struct svc_xprt *svc_create_socket(struct svc_serv *, int,
Expand Down Expand Up @@ -1017,7 +1018,7 @@ static struct svc_xprt_ops svc_tcp_ops = {
.xpo_recvfrom = svc_tcp_recvfrom,
.xpo_sendto = svc_tcp_sendto,
.xpo_release_rqst = svc_release_skb,
.xpo_detach = svc_sock_detach,
.xpo_detach = svc_tcp_sock_detach,
.xpo_free = svc_sock_free,
.xpo_prep_reply_hdr = svc_tcp_prep_reply_hdr,
.xpo_has_wspace = svc_tcp_has_wspace,
Expand Down Expand Up @@ -1287,6 +1288,24 @@ static void svc_sock_detach(struct svc_xprt *xprt)
sk->sk_state_change = svsk->sk_ostate;
sk->sk_data_ready = svsk->sk_odata;
sk->sk_write_space = svsk->sk_owspace;

if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
wake_up_interruptible(sk->sk_sleep);
}

/*
* Disconnect the socket, and reset the callbacks
*/
static void svc_tcp_sock_detach(struct svc_xprt *xprt)
{
struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt);

dprintk("svc: svc_tcp_sock_detach(%p)\n", svsk);

svc_sock_detach(xprt);

if (!test_bit(XPT_LISTENER, &xprt->xpt_flags))
kernel_sock_shutdown(svsk->sk_sock, SHUT_RDWR);
}

/*
Expand Down

0 comments on commit 535f159

Please sign in to comment.