xs_close(9)
π 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 astruct 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 holdingXPRT_LOCKEDβ and yes that underscore emphasis is in the original, she's that serious β in order to avoid issues withxs_reset_transportzeroing 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):
xs_nospace(9)xs_local_send_request(9)xs_udp_send_request(9)xs_tcp_send_request(9)xs_error_report(9)xs_destroy(9)xs_udp_data_read_skb(9)xs_data_ready(9)xs_local_state_change(9)xs_tcp_state_change(9)xs_udp_write_space(9)xs_tcp_write_space(9)xs_udp_set_buffer_size(9)xs_udp_timer(9)xs_set_port(9)xs_local_setup_socket(9)xs_enable_swap(9)xs_disable_swap(9)xs_tcp_shutdown(9)xs_tcp_setup_socket(9)xs_tls_handshake_done(9)xs_tcp_tls_setup_socket(9)xs_connect(9)xs_local_print_stats(9)xs_udp_print_stats(9)xs_tcp_print_stats(9)bc_send_request(9)xs_setup_local(9)xs_setup_udp(9)xs_setup_tcp(9)xs_setup_tcp_tls(9)xs_setup_bc_tcp(9)init_socket_xprt(9)cleanup_socket_xprt(9)
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
- 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