fscrypt_require_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 ✨

  • 0 on success πŸŽ‰
  • -ENOKEY if the key is missing πŸ’€
  • or another -errno code 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