nfs4_replay_free_cache(9)
πΈ nfs4_replay_free_cache(9) β kernel API manual energy πΈ
okay so bestie, we're in section 9 of the kernel API manual today, and the star of the show is nfs4_replay_free_cache π
don't worry, she's way less intimidating than the name suggests, i promise π«Ά
β¨ NAME β¨
nfs4_replay_free_cache β release dynamically allocated replay buffer π
like, the whole job. she frees. she resets. she goes home. periodt.
π SYNOPSIS π
void nfs4_replay_free_cache (struct nfs4_replay *rp );
nothing returned, no drama, just vibes and one pointer π
π¦ ARGUMENTS π¦
rpβ the replay cache you wanna reset, bestie. that's it. that's the whole argument π
π DESCRIPTION π
okay so here's the tea β
if rp->rp_buf points to a kmalloc'd buffer, she frees it and resets rp_buf to the inline rp_ibuf. so cute, so tidy, no leaks left on read π₯
and the way that she always zeroes rp_buflen? iconic. no notes. literally always, no cap β¨
ngl the "always" is doing a lot of work there β rp_buflen gets zeroed whether or not the free actually happened, and that's on purpose π
π§ SEE ALSO π§
the kernel file ./fs/nfsd/nfs4state.c and honestly her entire friend group, all of them show up:
nfs4_delegation_exists(9)hash_delegation_locked(9)revoke_delegation(9)nfsd4_revoke_states(9)nfsd4_revoke_export_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)
twenty of them. twenty!! a whole group chat π and that's the delegation/shrinker/state cluster, iykyk π
aaaaand that's the page, bestie π this one came out of ./fs/nfsd, dated October 2026, and she lives in section 9 of the Kernel API Manual β slay, go free those buffers responsibly π
β¨π¦
π¦ 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