fscrypt_set_context(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fscrypt_set_context(9) ✨

okay bestie, this little icon is from the Kernel API Manual and it's all about setting up the fscrypt context on a shiny new inode πŸ’–


πŸŽ€ NAME πŸŽ€

fscrypt_set_context β€” Set the fscrypt context of a new inode


πŸ¦‹ SYNOPSIS πŸ¦‹

int fscrypt_set_context (struct inode *inode , void *fs_data );

🌸 ARGUMENTS 🌸

  • inode β€” a new inode, periodt ✨
  • fs_data β€” private data given by FS and passed to ->set_context. that's the whole vibe 🫢

πŸ’… DESCRIPTION πŸ’…

okay so listen: this should be called after fscrypt_prepare_new_inode, generally during a filesystem transaction. no cap.

Everything here must be GFP_NOFS-safe. like, literally everything β€” that part is not optional πŸ’€


πŸ”₯ RETURN πŸ”₯

  • 0 β€” success, yay πŸŽ‰
  • -errno β€” failure, sad but valid 😭

🌈 SEE ALSO 🌈

Kernel file ./fs/crypto/policy.c β€” the whole friend group:


byeee 🫢 source/version: ./fs/crypto Β· date: October 2026 Β· page: fscrypt_set_context(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from