tcp: tsq: remove one locked operation in tcp_wfree()
authorEric Dumazet <edumazet@google.com>
Sat, 3 Dec 2016 19:14:51 +0000 (11:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2016 18:32:22 +0000 (13:32 -0500)
commit408f0a6c21e124cc4f6c7aa370b38aa47e55428d
tree11a45f9e4e5cfd77e62d1363ad734e6fe753cd91
parent40fc3423b983b864bf70b03199191260ae9b2ea6
tcp: tsq: remove one locked operation in tcp_wfree()

Instead of atomically clear TSQ_THROTTLED and atomically set TSQ_QUEUED
bits, use one cmpxchg() to perform a single locked operation.

Since the following patch will also set TCP_TSQ_DEFERRED here,
this cmpxchg() will make this addition free.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c