v9fs_vfs_create(9)
π
v9fs_vfs_create(9) β Kernel API Manual π
Okay bestie, welcome to the Kernel API Manual corner. Today's main character is v9fs_vfs_create(9), and yes she's literally the VFS hook for creating a regular file. Vibe check: passed. β¨
π NAME π
v9fs_vfs_create β VFS hook to create a regular file. That's the assignment, and she ate. Slay. π
β SYNOPSIS β
int v9fs_vfs_create (struct mnt_idmap *idmap , struct inode *dir ,
struct dentry *dentry , umode_t mode );
π«Ά ARGUMENTS π«Ά
idmapβ the idmap of the mount. Literally the mount's idmap, no cap.dirβ the parent directory. The folder holding the situation. Iconic.dentryβ the name of file to be created. This is the name in question, fr fr.modeβ the UNIX file mode to set. Permissions energy.
πΈ DESCRIPTION πΈ
Okay so real talk: open(.., O_CREAT) is handled in v9fs_vfs_atomic_open. Do not come for v9fs_vfs_create for that, bestie β that's a different function's moment. This one is only called for mknod(2). Periodt. π
π¦ SEE ALSO π¦
Kernel file ./fs/9p/vfs_inode.c is where the source lives, and here's the whole friend group, iykyk:
unixmode2p9mode(9)p9mode2perm(9)p9mode2unixmode(9)v9fs_uflags2omode(9)v9fs_blank_wstat(9)v9fs_alloc_inode(9)v9fs_free_inode(9)v9fs_evict_inode(9)v9fs_at_to_dotl_flags(9)v9fs_dec_count(9)v9fs_remove(9)v9fs_create(9)v9fs_vfs_mkdir(9)v9fs_vfs_lookup(9)v9fs_vfs_unlink(9)v9fs_vfs_rmdir(9)v9fs_vfs_rename(9)v9fs_vfs_getattr(9)v9fs_vfs_setattr(9)v9fs_stat2inode(9)v9fs_vfs_get_link(9)v9fs_vfs_mkspecial(9)v9fs_vfs_symlink(9)v9fs_vfs_link(9)v9fs_vfs_mknod(9)
Source/version: ./fs/9p and v9fs_vfs_create(9); date: October 2026. Bye bestie, 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