anon_inode_create_getfd(9)
π anon_inode_create_getfd(9) π
okay so welcome to the Kernel API Manual page for anon_inode_create_getfd β manual name folded in like a cute little sticker π. This one is lowkey the βnew anon inode, who dis?β energy, and every detail is coming with us. no cap π
πΈ NAME πΈ
anon_inode_create_getfd β like anon_inode_getfd(), but it creates a new !S_PRIVATE anon inode instead of reusing the singleton anon inode, and it calls the inode_init_security_anon() LSM hook. periodt β¨
π¦ SYNOPSIS π¦
int anon_inode_create_getfd (const char *name , const struct
file_operations *fops , void *priv , int flags , const struct inode
*context_inode );
π«Ά ARGUMENTS π«Ά
name[in]β name of the "class" of the new file. yes bestie, thatβs literally the label πfops[in]β file operations for the new file.priv[in]β private data for the new file; it will be the fileβsprivate_data.flags[in]β flags. iconic, no extra notes in the source πcontext_inode[in]β the logical relationship with the new inode; optional.
π DESCRIPTION π
Create a new anonymous inode and file pair. this can be done for two reasons:
- for the inode to have its own security context, so that LSMs can enforce policy on the inode's creation;
- if the caller needs a unique inode, for example in order to customize the size returned by
fstat.
The LSM may use context_inode in inode_init_security_anon, but a reference to it is not held. like, do not assume youβre holding a ref, bestie β that is the whole note π
It returns a newly created file descriptor or an error code. slay when it works, error code when it doesnβt π
π SEE ALSO π
- Kernel file
./fs/anon_inodes.c anon_inode_make_secure_inode(9)anon_inode_getfile(9)anon_inode_getfile_fmode(9)anon_inode_create_getfile(9)anon_inode_getfd(9)
mwah π β this page is from ./fs, dated October 2026, and itβs the anon_inode_create_getfd(9) moment. byeeee π¦
π¦ 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