nfsd_file_close_inode(9)
π 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 π
- Kernel file
./fs/nfsd/filecache.c nfsd_file_check_write_error(9)nfsd_file_put(9)nfsd_file_put_local(9)nfsd_file_file(9)nfsd_file_dispose_list_delayed(9)nfsd_file_net_dispose(9)nfsd_file_lru_cb(9)nfsd_file_cond_queue(9)nfsd_file_queue_for_close(9)nfsd_file_close_inode_sync(9)nfsd_file_close_export(9)__nfsd_file_cache_purge(9)nfsd_file_cache_purge(9)nfsd_file_is_cached(9)nfsd_file_acquire_gc(9)nfsd_file_acquire(9)nfsd_file_acquire_local(9)nfsd_file_acquire_opened(9)nfsd_file_acquire_dir(9)nfsd_fsnotify_recalc_mask(9)
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
- 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