sockets: delete stale comment from sofree()

First  paragraph refers to old past "we used to" and is no longer
important today.  Second paragraph has just a wrong statement that
socket buffer is destroyed before pru_detach.
This commit is contained in:
Gleb Smirnoff 2022-05-12 11:02:50 -07:00
parent 1f32cef471
commit 2e4e5ee23f

View File

@ -1206,15 +1206,6 @@ sofree(struct socket *so)
* From this point on, we assume that no other references to this
* socket exist anywhere else in the stack. Therefore, no locks need
* to be acquired or held.
*
* We used to do a lot of socket buffer and socket locking here, as
* well as invoke sorflush() and perform wakeups. The direct call to
* dom_dispose() and sbdestroy() are an inlining of what was
* necessary from sorflush().
*
* Notice that the socket buffer and kqueue state are torn down
* before calling pru_detach. This means that protocols shold not
* assume they can perform socket wakeups, etc, in their detach code.
*/
if (!SOLISTENING(so)) {
sbdestroy(&so->so_snd, so);