fscrypt_require_key(9)
π NAME π
okay bestie, buckle up: this is fscrypt_require_key(9) from the Kernel API Manual, and its whole gig is requiring an inode's encryption key π
β¨
π¦ SYNOPSIS π¦
int fscrypt_require_key (struct inode *inode );
πΈ ARGUMENTS πΈ
inodeβ the inode we need the key for. literally the main character here π
π DESCRIPTION π
So here's the vibe check: if the inode is encrypted, this function sets up its encryption key if that hasn't already been done. Then it requires that the key be present, and if it isn't, it returns -ENOKEY β no key, no service π
No locks are needed, bestie. And the key will live as long as the struct inode β so it won't go away from under you π«Ά
β¨ RETURN β¨
0on success π-ENOKEYif the key is missing π- or another
-errnocode if a problem occurred while setting up the encryption key π¬
π SEE ALSO π
- Kernel file
./fs/crypto/fscrypt_private.h struct fscrypt_prepared_key(9)
made with love from the ./fs/crypto source corner, dated October 2026, and stamped with the Kernel API Manual seal of approval for fscrypt_require_key(9) π«Άπ
π¦ 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