HomeFreeBSD

Simplify unp_disconnect() callers.

Description

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

Details

Provenance
markjAuthored on
Differential Revision
D26297: [unix(4) cleanup 4/8] Simplify unp_disconnect() callers.
Parents
rS365761: Rename unp_pcb_lock2().
Branches
Unknown
Tags
Unknown