fscrypt_con...or_new_inode(9)
β¨ NAME β¨
okay bestie, this is the Kernel API Manual page for fscrypt_con...or_new_inode(9), and the actual function is fscrypt_context_for_new_inode β create an encryption context for a new inode. periodt π
β¨ SYNOPSIS β¨
int fscrypt_context_for_new_inode (void *ctx , struct inode *inode );
β¨ ARGUMENTS β¨
ctxβ where context should be written. that's the spot, bestie π«Άinodeβ inode from which to fetch policy and nonce. she's the source of truth β¨
β¨ DESCRIPTION β¨
Given an in-core "prepared" (via fscrypt_prepare_new_inode) inode, generate a new context and write it to ctx. lowkey that's the whole move π
ctx _must_ be at least FSCRYPT_SET_CONTEXT_MAX_SIZE bytes. not optional, not "close enough", fr fr β give her the full size she needs.
β¨ RETURN β¨
size of the resulting context or a negative error code. so you either get the size, or you get a negative error code situation π
β¨ SEE ALSO β¨
Kernel file ./fs/crypto/policy.c and these iconique functions:
fscrypt_policies_equal(9)fscrypt_supported_policy(9)fscrypt_new_context(9)fscrypt_policy_from_context(9)fscrypt_has_permitted_context(9)fscrypt_set_context(9)fscrypt_parse_test_dummy_encryption(9)fscrypt_dummy_policies_equal(9)fscrypt_show_test_dummy_encryption(9)
mwah π β from source ./fs/crypto, October 2026, page fscrypt_con...or_new_inode(9). xoxo, bye bestie π§β¨
π¦ 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