nfsd_net_pre_exit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’€:

Go read them, iykyk πŸ“šπŸ’…


Ngl bestie, this page came from ./fs/nfsd, dated October 2026, and the whole thing is titled nfsd_net_pre_exit(9) β€” periodt. πŸ“βœ¨πŸ’–
πŸ“¦ where this page comes from