xs_close(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xs_close(9) β€” the Kernel API Manual page, bestie edition

okay so first things first, the page is literally called xs_close(9) and it lives in the Kernel API Manual β€” that's the vibe, that's the whole era. Let's get into it πŸŽ€


✨ NAME ✨

xs_close β€” close a socket. that's it. that's the whole thing. iconic minimalism honestly πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void xs_close (struct rpc_xprt *xprt );

no return value, she just goes in and does the thing. periodt ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • xprt β€” the transport. that's your girl, that's who you're passing in. she's a struct rpc_xprt * and she's the main character of this function 🌸

πŸ’– DESCRIPTION πŸ’–

so, like β€” this is used when all the requests are complete. as in all of them, fr fr. like, no DRC state remains on the server that we want to save. none. zero. the vibe check is empty and that's on purpose πŸ’€

⚠️ okay this is the important part, bestie, do not skip it: the caller _must_ be holding XPRT_LOCKED β€” and yes that underscore emphasis is in the original, she's that serious β€” in order to avoid issues with xs_reset_transport zeroing the socket from underneath a writer. like, literally zeroing it. underneath you. while you're writing. absolutely not, we do not let that happen πŸ™ˆ

so yeah: hold XPRT_LOCKED, or find out. no cap, that's a real hazard. πŸ”₯


🌈 SEE ALSO 🌈

the whole friend group, gathered for you 🫢 (and yeah, Kernel file ./net/sunrpc/xprtsock.c is where they all hang out):

like, that's thirty-four whole friends, she's so popular it's giving main character energy πŸ‘‘


πŸ“ signing off πŸ“

this page comes to you straight from ./net/sunrpc, dated October 2026 β€” mark your calendars bestie, she said see you then πŸ’œ stay locked, stay slay, and don't let anybody zero your socket βœ¨πŸ’…

πŸ“¦ where this page comes from