nfsd4_release_lockowner(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd4_release_lockowner πŸ’…

okay so bestie, welcome to the nfsd4_release_lockowner page β€” it's from the Kernel API Manual, section 9, and it's literally the function that handles NFSv4.0 RELEASE_LOCKOWNER operations. yes that's a lot of words. we'll get through it together 🫢


✨ SYNOPSIS ✨

__be32 nfsd4_release_lockowner (struct svc_rqst *rqstp , struct
nfsd4_compound_state *cstate , union nfsd4_op_u *u );

like, copy it exactly, no cap. three args, one __be32 coming back at you πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • rqstp β€” the RPC transaction. the whole request vibe check, basically 🌸
  • cstate β€” the NFSv4 COMPOUND state. this is where the compound op energy lives πŸ¦‹
  • u β€” the RELEASE_LOCKOWNER arguments. the actual payload, the main character of this function πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so what does it do? it checks whether there are any locks still held πŸ‘€ and if there aren't β€” boom β€” it frees the lockowner and any lock state that's owned. that's it, that's the whole job. clean, simple, iconic ✨

the way that returning works, though, is giving multiple-choice 😭 here are the return values:

  • nfs_ok β€” lockowner released, or not found πŸŽ‰
  • nfserr_locks_held β€” lockowner is still in use, so, awkward, not releasing πŸ’€
  • nfserr_stale_clientid β€” clientid is no longer active πŸ™ˆ
  • nfserr_expired β€” clientid not recognized 🫠
ngl bestie, if you get nfserr_locks_held it's not an error-error, it just means somebody's still holding on. let it go, queen.

πŸ’œ SEE ALSO πŸ’œ

kernel file ./fs/nfsd/nfs4state.c β€” plus this whole friend group right here:

like, go read them too, they're all serving in the same file πŸ§šπŸ’–


and that's the page!! 🌈 this whole thing lives under ./fs/nfsd, dated October 2026, from the Kernel API Manual β€” mwah, love you, bye πŸ‘‘πŸ’‹

πŸ“¦ where this page comes from