nfsd4_revoke_export_states(9)
π 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, andnnis 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:
nfs4_delegation_exists(9)hash_delegation_locked(9)revoke_delegation(9)nfs4_replay_free_cache(9)nfsd4_revoke_states(9)nfsd_slot_shrinker_count(9)nfsd_slot_shrinker_scan(9)nfsd4_put_client(9)nfsd_wait_for_delegreturn(9)nfsd_breaker_owns_lease(9)nfsd4_deleg_lm_open_conflict(9)nfsd4_process_open2(9)nfsd4_force_end_grace(9)nfs4_preprocess_stateid_op(9)nfs4_preprocess_seqid_op(9)nfsd4_release_lockowner(9)nfsd4_vet_deleg_time(9)nfsd4_deleg_getattr_conflict(9)nfsd_get_dir_deleg(9)nfsd_update_cmtime_attr(9)
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
- 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