tcp: no longer release socket ownership in tcp_release_cb()
This partially reverts c3f9b01849ef ("tcp: tcp_release_cb() should release socket ownership"). prequeue has been removed by Florian in commit e7942d0633c4 ("tcp: remove prequeue support") __tcp_checksum_complete_user() being gone, we no longer have to release socket ownership in tcp_release_cb(). This is a prereq for third patch in the series ("net: call prot->release_cb() when processing backlog"). Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
cd8bae8581
commit
b49d252216
@ -3519,9 +3519,6 @@ void release_sock(struct sock *sk)
|
||||
if (sk->sk_backlog.tail)
|
||||
__release_sock(sk);
|
||||
|
||||
/* Warning : release_cb() might need to release sk ownership,
|
||||
* ie call sock_release_ownership(sk) before us.
|
||||
*/
|
||||
if (sk->sk_prot->release_cb)
|
||||
sk->sk_prot->release_cb(sk);
|
||||
|
||||
|
@ -1101,16 +1101,6 @@ void tcp_release_cb(struct sock *sk)
|
||||
tcp_tsq_write(sk);
|
||||
__sock_put(sk);
|
||||
}
|
||||
/* Here begins the tricky part :
|
||||
* We are called from release_sock() with :
|
||||
* 1) BH disabled
|
||||
* 2) sk_lock.slock spinlock held
|
||||
* 3) socket owned by us (sk->sk_lock.owned == 1)
|
||||
*
|
||||
* But following code is meant to be called from BH handlers,
|
||||
* so we should keep BH disabled, but early release socket ownership
|
||||
*/
|
||||
sock_release_ownership(sk);
|
||||
|
||||
if (flags & TCPF_WRITE_TIMER_DEFERRED) {
|
||||
tcp_write_timer_handler(sk);
|
||||
|
Loading…
x
Reference in New Issue
Block a user