]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Simplify unp_disconnect() callers.
authormarkj <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:22:37 +0000 (19:22 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 15 Sep 2020 19:22:37 +0000 (19:22 +0000)
commite342adf6775cc7978244799d7194be47957bec3e
tree6f2ff5c51739f282b667acbc5fb8454e356aaab9
parent01d8fe5057c24fe9a428bf5c37849a5022e9acb2
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