nfsd_file_is_cached(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd_file_is_cached β€” from the Kernel API Manual, bestie

okay so first of all, welcome to nfsd_file_is_cached(9), a true icon of the kernel API manual and honestly kind of a vibe. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

nfsd_file_is_cached β€” literally the question: are there any cached open files for this inode? that's it. that's the function. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

bool nfsd_file_is_cached (struct inode *inode );

like, yes, it's a bool. she returns a yes or a no. no in-between, no situationships 🌸


πŸŽ€ ARGUMENTS πŸŽ€

  • inode β€” the inode to check πŸ‘€ that's the whole argument. one (1) inode. the subject of the vibe check.

πŸ”₯ DESCRIPTION πŸ”₯

so the lookup matches inodes in all net namespaces, and it's atomic wrt nfsd_file_acquire. no cap β€” all of them, and it plays nice with nfsd_file_acquire atomically. the way that this function just knows 😭

now the return values, bestie, because this is the part everyone actually asks about:

  • true: filecache contains at least one file matching this inode βœ… slay, she found something
  • false: filecache contains no files matching this inode πŸ“ bestie the cache is empty for this inode, it's giving nothing

periodt. that's the whole description. iconic, honestly.


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./fs/nfsd/filecache.c β€” the source file, iykyk πŸ’–

and now the whole friend group, in order, no one left behind:


🌈 and that's the whole page, bestie! this one lives in ./fs/nfsd and the manual is dated October 2026 β€” put it in your calendar, screenshot it, send it to the group chat ��⭐ bye mwah πŸ’œ

πŸ“¦ where this page comes from