nfsd_net_pre_exit(9)
π nfsd_net_pre_exit β like, the cutest little teardown hook in the kernel API manual β¨
Okay bestie, welcome to nfsd_net_pre_exit(9), brought to you by the Kernel API Manual (yes that's the manual name, we're classy here π). This one's a tiny function with main character energy, so let's get into it π«Ά
πΈ NAME πΈ
nfsd_net_pre_exit β disconnects localio clients from a net namespace. That's it. That's the whole vibe. β¨
π¦ SYNOPSIS π¦
__net_exit void nfsd_net_pre_exit (struct net *net );
Literal character-for-character slay, no notes π
π ARGUMENTS π
netβ a network namespace that is literally about to be destroyed π like it's on its way out, it has its coat on and everything
π DESCRIPTION π
Okay so here's what's happening, and it's honestly kind of iconic π§
This call invalidates the ->net pointers held by localio clients β and it does it while they can still safely access nn->counter π
Read that again, bestie: the invalidation happens in that safe little window. The pointers get nuked, but the access to nn->counter is still safe at that moment. That's the whole point. Timing is everything, no cap π₯
β SEE ALSO β
Kernel file ./fs/nfsd/nfsctl.c, plus this whole friend group π:
nfsd_nl_rpc_status_get_dumpit(9)nfsd_nl_fh_key_set(9)nfsd_nl_threads_set_doit(9)nfsd_nl_threads_get_doit(9)nfsd_nl_version_set_doit(9)nfsd_nl_version_get_doit(9)nfsd_nl_validate_listeners(9)nfsd_nl_listener_set_doit(9)nfsd_nl_listener_get_doit(9)nfsd_nl_pool_mode_set_doit(9)nfsd_nl_pool_mode_get_doit(9)nfsd_nl_cache_flush_doit(9)nfsd_nl_server_stats_get_dumpit(9)nfsd_nl_unlock_ip_doit(9)nfsd_nl_unlock_filesystem_doit(9)nfsd_nl_unlock_export_doit(9)nfsd_net_init(9)nfsd_net_exit(9)
Go read them, iykyk ππ
Ngl bestie, this page came from./fs/nfsd, dated October 2026, and the whole thing is titlednfsd_net_pre_exit(9)β periodt. πβ¨π
π¦ 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