nfs4_replay_free_cache(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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:

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