nfsd4_revoke_states(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

bestie, welcome to the Kernel API Manual entry for nfsd4_revoke_states β€” it's the function that revokes all nfsv4 states associated with a given filesystem. periodt. πŸ’…

✨ SYNOPSIS ✨

void nfsd4_revoke_states (struct nfsd_net *nn , struct super_block *sb
       );

πŸŽ€ ARGUMENTS πŸŽ€

  • nn β€” used to identify the instance of nfsd (there is one per net namespace), okay bestie?
  • sb β€” the super_block used to identify the target filesystem.

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: all nfs4 states held by the server instance and associated with a file on the given filesystem β€” that's open, lock, delegation, and layout states β€” will be revoked. That results in any files being closed, and so all references from nfsd to the filesystem get released. The glow-up? nfsd will no longer prevent the filesystem from being unmounted. slay. ✨

The clients that own those states will subsequently be notified that the states have been "admin-revoked". not me being dramatic about a kernel notification, but it's iconic. πŸ’€

πŸ¦‹ CONTEXT πŸ¦‹

bestie, this is a must not a maybe: the caller must hold nfsd_mutex with NFSD_NET_UP set. Outside that window, nn->conf_id_hashtbl is unallocated or freed, so the walk would dereference a NULL or dangling pointer. no cap, that's the bad timeline. 😭

🌈 SEE ALSO 🌈


signed off from the ./fs/nfsd source with the October 2026 date, for nfsd4_revoke_states(9) β€” byeee bestie 🫢

πŸ“¦ where this page comes from