vfs_tmpfile(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so you're here for vfs_tmpfile(9) from the Kernel API Manual, and bestie, this page is lowkey a whole vibe: kernel-level temporary-file creation with idmap lore. Let's get into it πŸ’…βœ¨

πŸ’– NAME πŸ’–

vfs_tmpfile β€” create tmpfile πŸŽ€

✨ SYNOPSIS ✨

Here's the signature in all its exact glory β€” don't touch the spacing, bestie:

       int vfs_tmpfile (struct mnt_idmap *idmap , const struct path *parentpath
       , struct file *file , umode_t mode );

πŸŽ€ ARGUMENTS πŸŽ€

  • idmap β€” idmap of the mount the inode was found from 🫢
  • parentpath β€” pointer to the path of the base directory 🌸
  • file β€” file descriptor of the new tmpfile ✨
  • mode β€” mode of the new tmpfile πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Create a temporary file. That's the headline, and it's iconic πŸŽ€

If the inode has been found through an idmapped mount the idmap of the vfsmount must be passed through idmap. This function will then take care to map the inode according to idmap before checking permissions. On non-idmapped mounts or if permission checking is to be performed on the raw inode simply pass nop_mnt_idmap.

bestie, the idmap choice is the whole plot twist here β€” use the mount's idmap when it's idmapped, or nop_mnt_idmap when you're on a non-idmapped mount / doing permission checking on the raw inode πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./fs/namei.c is the backstage pass, and the whole squad rolls deep β€” every single one of these cuties is listed here, fr fr:


and that's the whole page, bestie 🫢 vfs_tmpfile(9) sign-off: source/version ./fs; date October 2026. go make that tmpfile with main character energy πŸ’…βœ¨

πŸ“¦ where this page comes from