fscrypt_con...or_new_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

mwah πŸ’‹ β€” from source ./fs/crypto, October 2026, page fscrypt_con...or_new_inode(9). xoxo, bye bestie 🧚✨

πŸ“¦ where this page comes from