lookup_file_dentry(9)
π 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β theeventfs_inodethat the file is being created underidxβ the index into theentry_attrs[]of theei, iykykmodeβ the mode of the file, no capdataβ the data used to set the inode of the file on openfopsβ 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:
lookup_file(9)lookup_dir_entry(9)eventfs_d_release(9)eventfs_root_lookup(9)eventfs_create_dir(9)eventfs_create_events_dir(9)eventfs_remove_rec(9)eventfs_remove_dir(9)eventfs_remove_events_dir(9)
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
- 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