]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Simplify unp_disconnect() callers.
authorMark Johnston <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:22:37 +0000 (19:22 +0000)
committerMark Johnston <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:22:37 +0000 (19:22 +0000)
commitf0317f868b6d796a86c89c9790b158a2976270d5
tree6f2ff5c51739f282b667acbc5fb8454e356aaab9
parent4820bf6ac2b5fd3c2287d306c415f4e2318ae0d4
Simplify unp_disconnect() callers.

In all cases, PCBs are unlocked after unp_disconnect() returns.  Since
unp_disconnect() may release the last PCB reference, callers may have to
bump the refcount before the call just so that they can release them
again.

Change unp_disconnect() to release PCB locks as well as connection
references; this lets us remove several refcount manipulations.  Tighten
assertions.

Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26297
sys/kern/uipc_usrreq.c