HomeFreeBSD

unix: factor unp_vnode_peer() out of unp_connectat()

Description

unix: factor unp_vnode_peer() out of unp_connectat()

Move the "resolve a locked vnode to the referenced peer socket it names"
block into a helper. Pure code motion: the caller now calls
unp_vnode_peer() and keeps the vput()/connect/sorele() sequence.

No functional change intended.

Note: This refactor isn't really necessary as unp_vnode_peer() will
only be called once throughout this entire patch series. I am just
including it out of my personal preferences for decomposing tasks into
smaller functions --- we can skip this patch if the reviewers don't like
this.

Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems>
Assisted-by: Claude Code (Claude Opus 4.8 and Fable 5)

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D58461

Details

Provenance
inquire_JohnEricson.meAuthored on Aug 10 2026, 3:04 PM
markjCommitted on Aug 10 2026, 5:31 PM
Reviewer
markj
Differential Revision
D58461: unix: factor `unp_vnode_peer()` out of `unp_connectat()`
Parents
rG26147c51546e: unix: pin the pathname peer by reference across the connect
Branches
Unknown
Tags
Unknown