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
F173547140: D58461.diff
Sat, Sep 26, 6:36 PM
Unknown Object (File)
Thu, Sep 24, 12:27 AM
Unknown Object (File)
Mon, Sep 21, 10:38 AM
Unknown Object (File)
Sun, Sep 20, 6:44 AM
Unknown Object (File)
Sun, Sep 20, 12:39 AM
Unknown Object (File)
Sun, Sep 20, 12:36 AM
Unknown Object (File)
Wed, Sep 16, 9:10 AM
Unknown Object (File)
Tue, Sep 8, 3:22 PM
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 Skipped
Unit
No Test Coverage
Build Status
Buildable 75134
Build 72017: arc lint + arc unit

Event Timeline

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

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.Aug 4 2026, 9:13 PM