ecryptfs_do_create(9)
π 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_PTRon error condition π
ngl bestie,ERR_PTRmeans you gotta check withIS_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 anERR_PTRon error, so treat that as your heads-up fr fr π
π₯ SEE ALSO π₯
- Kernel file
./fs/ecryptfs/inode.c ecryptfs_interpose(9)ecryptfs_lookup(9)upper_size_to_lower_size(9)__ecryptfs_truncate(9)ecryptfs_truncate(9)ecryptfs_setattr(9)
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
- 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