1 This was added in commit 46d3ceabd8d98ed0ad10f20c595ca784e34786c5 (tcp:
2 TCP Small Queues) but we need it for pppoatm too.
4 --- a/include/net/sock.h
5 +++ b/include/net/sock.h
6 @@ -810,6 +810,8 @@ struct proto {
7 int (*backlog_rcv) (struct sock *sk,
10 + void (*release_cb)(struct sock *sk);
12 /* Keeping track of sk's, looking them up, and port selection methods. */
13 void (*hash)(struct sock *sk);
14 void (*unhash)(struct sock *sk);
17 @@ -2138,6 +2138,10 @@ void release_sock(struct sock *sk)
18 spin_lock_bh(&sk->sk_lock.slock);
19 if (sk->sk_backlog.tail)
22 + if (sk->sk_prot->release_cb)
23 + sk->sk_prot->release_cb(sk);
25 sk->sk_lock.owned = 0;
26 if (waitqueue_active(&sk->sk_lock.wq))
27 wake_up(&sk->sk_lock.wq);