mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
tcp/dccp: avoid one atomic operation for timewait hashdance
First, rename __inet_twsk_hashdance() to inet_twsk_hashdance() Then, remove one inet_twsk_put() by setting tw_refcnt to 3 instead of 4, but adding a fat warning that we do not have the right to access tw anymore after inet_twsk_hashdance() Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1e75701175
commit
ec94c2696f
4 changed files with 23 additions and 22 deletions
|
|
@ -63,9 +63,10 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
|
|||
*/
|
||||
local_bh_disable();
|
||||
inet_twsk_schedule(tw, timeo);
|
||||
/* Linkage updates. */
|
||||
__inet_twsk_hashdance(tw, sk, &dccp_hashinfo);
|
||||
inet_twsk_put(tw);
|
||||
/* Linkage updates.
|
||||
* Note that access to tw after this point is illegal.
|
||||
*/
|
||||
inet_twsk_hashdance(tw, sk, &dccp_hashinfo);
|
||||
local_bh_enable();
|
||||
} else {
|
||||
/* Sorry, if we're out of memory, just CLOSE this
|
||||
|
|
|
|||
Loading…
Reference in a new issue