xprt_switch_get(9)
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 tostruct 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:
rpc_xprt_switch_add_xprt(9)rpc_xprt_switch_remove_xprt(9)rpc_xprt_switch_get_main_xprt(9)xprt_switch_alloc(9)xprt_switch_put(9)rpc_xprt_switch_set_roundrobin(9)xprt_iter_init(9)xprt_iter_init_listall(9)xprt_iter_xchg_switch(9)xprt_iter_destroy(9)xprt_iter_xprt(9)xprt_iter_get_next(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms