xprt_switch_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual β€” today we're looking at xprt_switch_get(9), and it's giving tiny-but-important refcount behavior. ✨

🌸 NAME 🌸

xprt_switch_get β€” Return a reference to a rpc_xprt_switch. That's the whole assignment, and it ate. πŸ’…

✨ SYNOPSIS ✨

struct rpc_xprt_switch * xprt_switch_get (struct rpc_xprt_switch *xps );

πŸŽ€ ARGUMENTS πŸŽ€

  • xps β€” pointer to struct rpc_xprt_switch. That's the thing you're passing in, bestie. 🫢

πŸ’– DESCRIPTION πŸ’–

Returns a reference to xps unless the refcount is already zero. So the refcount-zero case is the exception β€” that is not the moment you get a reference from this function, and that's the whole vibe. πŸ™ˆπŸ’€

🌈 SEE ALSO 🌈

Kernel file: ./net/sunrpc/xprtmultipath.c β€” and here's the whole reference friend group, no cap:

mwah πŸ’‹ β€” this lil page comes from ./net/sunrpc and it's dated October 2026. Go be iconic with your refcounts, bestie. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from