nfsd4_revoke_export_states(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd4_revoke_export_states(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for nfsd4_revoke_export_states ✨ β€” this is the manual page header btw, the title's right there and the manual name is Kernel API Manual, we're all caught up 🫢


🌸 NAME 🌸

nfsd4_revoke_export_states β€” revoke nfsv4 states acquired through an export. that's it. that's the whole vibe check πŸ‘‘


✨ SYNOPSIS ✨

void nfsd4_revoke_export_states (struct nfsd_net *nn , const struct path
*path );

like literally just two args and no return value, she's a void, she doesn't owe you a result πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • nn β€” used to identify the instance of nfsd (there is one per net namespace). so like, one nfsd per net ns, and nn is how you say which one, iykyk πŸ¦‹
  • path β€” the export path whose states should be revoked. yeah. that one 🌸

πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea β˜• β€” all nfs4 states acquired through any export matching path get revoked. and when we say all, we mean:

  • open
  • lock
  • delegation
  • layout

all four, babes πŸ”₯ and it does not care which client holds them. doesn't matter whose states they are, they're getting revoked, periodt πŸ’€

The matching is done by path identity β€” that's dentry + vfsmount, no cap β€” so multiple svc_export objects for the same path, one per auth_domain, are handled correctly. the way that just works is honestly iconic πŸ‘‘

Userspace (exportfs -u) sends this after removing the last client for a path, which enables the underlying filesystem to be unmounted. so it's the little cleanup gremlin that lets the unmount happen 🧚✨


πŸ¦‹ CONTEXT πŸ¦‹

⚠️ bestie read this part for real ⚠️

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. like, actual crash material 😭 so please, hold the mutex, keep NFSD_NET_UP set, do not skip this, fr fr πŸ™ˆ


🌈 SEE ALSO 🌈

Kernel file ./fs/nfsd/nfs4state.c β€” and the whole friend group:


and that's the whole page, bestie πŸŽ€ mwah πŸ’‹

sign-off time: this one lives in ./fs/nfsd, dated October 2026, and it's the nfsd4_revoke_export_states(9) page β€” go revoke some states responsibly, ily πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from