lookup_file_dentry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lookup_file_dentry(9) β€” the kernel API manual, bestie edition πŸŽ€

okay so real talk, this page lives in the Kernel API Manual and it's all about one little function that makes a dentry appear for a file that belongs to an eventfs_inode. yes it's niche. yes it's iconic. let's get into it ✨


✨ NAME ✨

lookup_file_dentry β€” literally creates a dentry for a file of an eventfs_inode πŸ¦‹


🌸 SYNOPSIS 🌸

struct dentry * lookup_file_dentry (struct dentry *dentry , struct
eventfs_inode *ei , int idx , umode_t mode , void *data , const struct
file_operations *fops );

six arguments, one pointer out. the way that signature just sits there. slay πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • dentry β€” the parent dentry, like, the folder vibe that the new file's dentry gets created under 🫢
  • ei β€” the eventfs_inode that the file is being created under
  • idx β€” the index into the entry_attrs[] of the ei, iykyk
  • mode β€” the mode of the file, no cap
  • data β€” the data used to set the inode of the file on open
  • fops β€” the fops of the file to be created, periodt

🧚 DESCRIPTION 🧚

so what this function does β€” it creates a dentry for a file that's associated with an eventfs_inode ei. it uses the entry attributes specified by idx, if they're available (if they're not, well, that's the vibe).

the file gets the specified mode, and its inode gets set up with data upon open. the file operations get set to fops. that's it. that's the whole main character arc πŸ‘‘


⭐ RETURN ⭐

returns a pointer to the newly created file's dentry β€” or an error pointer 😭 (yes, check it, bestie, don't just assume it worked)


πŸ”₯ SEE ALSO πŸ”₯

the kernel file ./fs/tracefs/event_inode.c, plus the whole friend group:


ok that's the whole page, go touch some tracefs πŸ’€

and that's a wrap, bestie πŸŽ€ this came out of ./fs/tracefs, dated October 2026 β€” see you in the next manpage, mwah πŸ’œ

πŸ“¦ where this page comes from