diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-17 05:39:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-17 05:39:21 -0400 |
commit | 44ccff1f539c8c5bbfc1eacd41cb9ef65022a4ca (patch) | |
tree | 500bb91d30f0c4952788faa553099bfe7707e711 /net | |
parent | 7b66767f969edcbdd573aca8063beee7534d242b (diff) |
rose: Use sock_graft() and remove bogus sk_socket and sk_sleep init.
This is the rose variant of changeset
9375cb8a1232d2a15fe34bec4d3474872e02faec
("ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/rose/af_rose.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 1ebf65294405..af86bcb604e5 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -566,13 +566,11 @@ static struct sock *rose_make_new(struct sock *osk) | |||
566 | #endif | 566 | #endif |
567 | 567 | ||
568 | sk->sk_type = osk->sk_type; | 568 | sk->sk_type = osk->sk_type; |
569 | sk->sk_socket = osk->sk_socket; | ||
570 | sk->sk_priority = osk->sk_priority; | 569 | sk->sk_priority = osk->sk_priority; |
571 | sk->sk_protocol = osk->sk_protocol; | 570 | sk->sk_protocol = osk->sk_protocol; |
572 | sk->sk_rcvbuf = osk->sk_rcvbuf; | 571 | sk->sk_rcvbuf = osk->sk_rcvbuf; |
573 | sk->sk_sndbuf = osk->sk_sndbuf; | 572 | sk->sk_sndbuf = osk->sk_sndbuf; |
574 | sk->sk_state = TCP_ESTABLISHED; | 573 | sk->sk_state = TCP_ESTABLISHED; |
575 | sk->sk_sleep = osk->sk_sleep; | ||
576 | sock_copy_flags(sk, osk); | 574 | sock_copy_flags(sk, osk); |
577 | 575 | ||
578 | init_timer(&rose->timer); | 576 | init_timer(&rose->timer); |
@@ -924,14 +922,12 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags) | |||
924 | goto out_release; | 922 | goto out_release; |
925 | 923 | ||
926 | newsk = skb->sk; | 924 | newsk = skb->sk; |
927 | newsk->sk_socket = newsock; | 925 | sock_graft(newsk, newsock); |
928 | newsk->sk_sleep = &newsock->wait; | ||
929 | 926 | ||
930 | /* Now attach up the new socket */ | 927 | /* Now attach up the new socket */ |
931 | skb->sk = NULL; | 928 | skb->sk = NULL; |
932 | kfree_skb(skb); | 929 | kfree_skb(skb); |
933 | sk->sk_ack_backlog--; | 930 | sk->sk_ack_backlog--; |
934 | newsock->sk = newsk; | ||
935 | 931 | ||
936 | out_release: | 932 | out_release: |
937 | release_sock(sk); | 933 | release_sock(sk); |