diff options
author | Eric Dumazet <edumazet@google.com> | 2015-07-08 14:28:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-09 15:12:20 -0700 |
commit | dbe7faa4045ea83a37b691b12bb02a8f86c2d2e9 (patch) | |
tree | 4c7b8918dbe2c4caacd120deffe2e8a8235d9561 /net/netfilter/xt_TPROXY.c | |
parent | fc01538f9fb75572c969ca9988176ffc2a8741d6 (diff) | |
download | op-kernel-dev-dbe7faa4045ea83a37b691b12bb02a8f86c2d2e9.zip op-kernel-dev-dbe7faa4045ea83a37b691b12bb02a8f86c2d2e9.tar.gz |
inet: inet_twsk_deschedule factorization
inet_twsk_deschedule() calls are followed by inet_twsk_put().
Only particular case is in inet_twsk_purge() but there is no point
to defer the inet_twsk_put() after re-enabling BH.
Lets rename inet_twsk_deschedule() to inet_twsk_deschedule_put()
and move the inet_twsk_put() inside.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_TPROXY.c')
-rw-r--r-- | net/netfilter/xt_TPROXY.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c index cca96ce..d0c96c5 100644 --- a/net/netfilter/xt_TPROXY.c +++ b/net/netfilter/xt_TPROXY.c @@ -272,8 +272,7 @@ tproxy_handle_time_wait4(struct sk_buff *skb, __be32 laddr, __be16 lport, hp->source, lport ? lport : hp->dest, skb->dev, NFT_LOOKUP_LISTENER); if (sk2) { - inet_twsk_deschedule(inet_twsk(sk)); - inet_twsk_put(inet_twsk(sk)); + inet_twsk_deschedule_put(inet_twsk(sk)); sk = sk2; } } @@ -437,8 +436,7 @@ tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff, tgi->lport ? tgi->lport : hp->dest, skb->dev, NFT_LOOKUP_LISTENER); if (sk2) { - inet_twsk_deschedule(inet_twsk(sk)); - inet_twsk_put(inet_twsk(sk)); + inet_twsk_deschedule_put(inet_twsk(sk)); sk = sk2; } } |