xprt_switch_put(9)
π xprt_switch_put(9) β the Kernel API Manual, bestie edition π
okay so real talk, this is a page straight out of the Kernel API Manual (xprt_switch_put(9)) and it's genuinely so simple you're gonna slay it. no cap. π
β¨ NAME β¨
xprt_switch_put β release a reference to a rpc_xprt_switch π¦
like, you're literally just letting go. putting it down. releasing the reference. it's giving closure. π
πΈ SYNOPSIS πΈ
void xprt_switch_put (struct rpc_xprt_switch *xps );
that's it. that's the whole vibe. one function, one arg, returns void (so like, nothing back, don't @ it). β¨
π ARGUMENTS π
xpsβ pointer tostruct rpc_xprt_switch. it's a pointer, bestie, so be normal about it and pass a valid one fr fr. π
π₯ DESCRIPTION π₯
okay so the whole thing: you call this and it releases the reference to xps, and then it frees it once the refcount is zero. π«Ά
that's the entire personality. it's a refcount drop with a lil cleanup on the side β when the last reference goes bye-bye, the thing actually gets freed. no cap, that's it, that's the function. icon behavior honestly π
π SEE ALSO π
the kernel file is ./net/sunrpc/xprtmultipath.c and if you're obsessed (you are) here's the whole friend group you should also go read:
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_get(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)
main character energy across the entire net/sunrpc directory honestly β
π tiny reminder:xpsis a pointer tostruct rpc_xprt_switch, and the free only happens once the refcount is zero. it's literally in the description, don't come for me. π
and that's the page!! brought to you by ./net/sunrpc, dated October 2026, from the Kernel API Manual. mwah, go free those references responsibly πβ¨ππ¦πΈπ
π«Ά
π¦ 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