fscrypt_prepare_readdir(9)
β¨ fscrypt_prepare_readdir(9) β¨
okay so welcome to the Kernel API Manual entry for fscrypt_prepare_readdir(9), bestie π this one is short and iconic.
π NAME π
fscrypt_prepare_readdir β prepare to read a possibly-encrypted directory π¦
πΈ SYNOPSIS πΈ
int fscrypt_prepare_readdir (struct inode *dir );
π ARGUMENTS π
dirβ the directory inode π that's the directory we're prepping, periodt.
π§ DESCRIPTION π§
If the directory is encrypted and it doesn't already have its encryption key set up, try to set it up so that the filenames will be listed in plaintext form rather than in no-key form. β¨
β RETURN β
0 on success; -errno on error. π
Note that the encryption key being unavailable is not considered an error. It is also not an error if the encryption policy is unsupported by this kernel; that is treated like the key being unavailable, so that files can still be deleted. π
π SEE ALSO π
- Kernel file:
./include/linux/fscrypt.h fscrypt_needs_contents_encryption(9)fscrypt_is_nokey_name(9)fscrypt_has_encryption_key(9)fscrypt_prepare_link(9)fscrypt_prepare_rename(9)fscrypt_prepare_lookup(9)fscrypt_prepare_setattr(9)fscrypt_encrypt_symlink(9)
later bestie π«Ά this page came from ./include/linux, is dated October 2026, and it's fscrypt_prepare_readdir(9) signing off π
π
π¦ 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