Page MenuHomeFreeBSD

unix: factor `unp_vnode_peer()` out of `unp_connectat()`
ClosedPublic

Authored by inquire_JohnEricson.me on Jul 25 2026, 8:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 27, 12:02 PM
Unknown Object (File)
Thu, Aug 27, 7:05 AM
Unknown Object (File)
Thu, Aug 27, 7:03 AM
Unknown Object (File)
Wed, Aug 26, 8:05 PM
Unknown Object (File)
Tue, Aug 25, 6:01 PM
Unknown Object (File)
Tue, Aug 25, 6:00 PM
Unknown Object (File)
Fri, Aug 21, 9:43 PM
Unknown Object (File)
Fri, Aug 21, 2:48 AM
Subscribers

Details

Summary

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)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/kern/uipc_usrreq.c
3043

These comments (here and elsewhere in the series) are somewhat verbose for my taste, they're just restating what the code does (or isn't doing).

This revision is now accepted and ready to land.Tue, Aug 4, 9:13 PM