Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315071
b: refs/heads/master
c: b6242b9
h: refs/heads/master
i:
  315069: 4ab97ce
  315067: 6c0b1a3
  315063: 58d7d9b
  315055: d69b08a
  315039: 5fcfb50
  315007: 298ea01
v: v3
  • Loading branch information
David S. Miller committed Jul 11, 2012
1 parent 7f28f3e commit 7e6ea40
Show file tree
Hide file tree
Showing 3 changed files with 3 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: 81166dd6fa8eb780b2132d32fbc77eb6ac04e44e
refs/heads/master: b6242b9b45e84ef71c59002cd128c3197938cb2f
1 change: 0 additions & 1 deletion trunk/include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ struct tcp_timewait_sock {
u32 tw_rcv_wnd;
u32 tw_ts_recent;
long tw_ts_recent_stamp;
struct inet_peer *tw_peer;
#ifdef CONFIG_TCP_MD5SIG
struct tcp_md5sig_key *tw_md5_key;
#endif
Expand Down
16 changes: 2 additions & 14 deletions trunk/net/ipv4/tcp_minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,9 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
const struct inet_connection_sock *icsk = inet_csk(sk);
const struct tcp_sock *tp = tcp_sk(sk);
bool recycle_ok = false;
bool recycle_on = false;

if (tcp_death_row.sysctl_tw_recycle && tp->rx_opt.ts_recent_stamp) {
if (tcp_death_row.sysctl_tw_recycle && tp->rx_opt.ts_recent_stamp)
recycle_ok = tcp_remember_stamp(sk);
recycle_on = true;
}

if (tcp_death_row.tw_count < tcp_death_row.sysctl_max_tw_buckets)
tw = inet_twsk_alloc(sk, state);
Expand All @@ -281,7 +278,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
struct tcp_timewait_sock *tcptw = tcp_twsk((struct sock *)tw);
const int rto = (icsk->icsk_rto << 2) - (icsk->icsk_rto >> 1);
struct inet_sock *inet = inet_sk(sk);
struct inet_peer *peer = NULL;

tw->tw_transparent = inet->transparent;
tw->tw_rcv_wscale = tp->rx_opt.rcv_wscale;
Expand All @@ -305,12 +301,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
}
#endif

if (recycle_on)
peer = icsk->icsk_af_ops->get_peer(sk);
tcptw->tw_peer = peer;
if (peer)
atomic_inc(&peer->refcnt);

#ifdef CONFIG_TCP_MD5SIG
/*
* The timewait bucket does not have the key DB from the
Expand Down Expand Up @@ -362,11 +352,9 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)

void tcp_twsk_destructor(struct sock *sk)
{
#ifdef CONFIG_TCP_MD5SIG
struct tcp_timewait_sock *twsk = tcp_twsk(sk);

if (twsk->tw_peer)
inet_putpeer(twsk->tw_peer);
#ifdef CONFIG_TCP_MD5SIG
if (twsk->tw_md5_key) {
tcp_free_md5sig_pool();
kfree_rcu(twsk->tw_md5_key, rcu);
Expand Down

0 comments on commit 7e6ea40

Please sign in to comment.