ecryptfs_do_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ecryptfs_do_create β€” the kernel API manual, but make it make sense

okay so bestie, we're looking at ecryptfs_do_create(9) from the Kernel API Manual ✨ this one lives in the eCryptfs corner of the kernel and it's literally about making new files happen, so let's get into it 🫢


🌸 SYNOPSIS 🌸

struct inode * ecryptfs_do_create (struct inode *directory_inode ,
struct dentry *ecryptfs_dentry , umode_t mode );

that's the whole signature, no cap β€” returns a struct inode *, takes three things πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • directory_inode β€” the inode of the new file's dentry's parent in ecryptfs. yes that's a whole chain of possession, it's giving family tree energy 🌈
  • ecryptfs_dentry β€” the new file's dentry in ecryptfs. this is the baby being born πŸ‘‘
  • mode β€” the mode of the new file. you know, the permissions vibe check πŸ¦‹

✨ DESCRIPTION ✨

so what it actually does: it creates the underlying file and the eCryptfs inode that will link to it. two-for-one, iconic πŸ’…

it will also update the eCryptfs directory inode to mimic the stat of the lower directory inode β€” like, keeping the mirror looking right, iykyk πŸͺž

and the return values, listen up:

  • on success it returns the new eCryptfs inode πŸ’–
  • if things go sideways it returns an ERR_PTR on error condition 😭
ngl bestie, ERR_PTR means you gotta check with IS_ERR() before you go dereferencing anything. that's not me adding lore, that's just how error pointers work β€” but the manpage itself only tells you it returns an ERR_PTR on error, so treat that as your heads-up fr fr πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

like, go read those next, they're all in their own little eCryptfs friend group 🧚


πŸ’œ sign-off πŸ’œ

this legend comes from the source path ./fs/ecryptfs, dated October 2026, and the page itself is ecryptfs_do_create(9) β€” periodt, that's the whole manual, slay πŸŽ€β­

πŸ“¦ where this page comes from