nfsd_file_close_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd_file_close_inode β€” a Kernel API Manual moment (section 9, bestie)

okay so real talk, this is from the kernel API manual, page nfsd_file_close_inode(9), and it's honestly such a lil workhorse function. let's get into it 🫢


✨ NAME ✨

nfsd_file_close_inode β€” the "attempt a deferred close of a nfsd_file" girlie πŸ’«

🌸 SYNOPSIS 🌸

void nfsd_file_close_inode (struct inode *inode );

like, that's it. that's the whole signature. returns void because she's not here to give you feedback, she's here to do the thing ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” the inode of the file you're attempting to remove. this is your target, your main character, the whole reason we're here πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is: close out any open nfsd_files that can be reaped for inode. simple enough right? but here's the plot twist β€” the actual freeing is deferred to the nfsd service threads. so it's giving "i'll handle it later, i promise" 😭 like she's not doing the cleanup herself, she's queueing it up for the service threads to deal with. delegation icon.

and where do we use her? two places, no more no less:

  • the fsnotify callbacks
  • the setlease notifier

that's the whole vibe. she's the little helper those two call when they need an inode's nfsd_files to get closed out (eventually, deferred-ly, as established) πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

like, that's the whole friend group right there. the *_sync version of her is also in there if you need the non-deferred one, iykyk 🌈


ngl the deferred free is the whole point β€” don't go expecting this to be done-done when it returns, bestie πŸ’€

and that's the page!! source is ./fs/nfsd, dated October 2026, and honestly? she ate. periodt. πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from