fscrypt_prep...okup_partial(9)
π fscrypt_prep...okup_partial(9)
okay so this is a page straight out of the Kernel API Manual, and bestie, it's a lil niche one but we're gonna make it make sense π
β¨ NAME β¨
fscrypt_prepare_lookup_partial β prepare lookup without the filename setup
like yes she does the prep work, but she is NOT doing the whole name thing, and that's the entire point π
πΈ SYNOPSIS πΈ
int fscrypt_prepare_lookup_partial (struct inode *dir , struct dentry
*dentry );
π¦ ARGUMENTS π¦
dirβ the encrypted directory being searched π that's the one we're digging around indentryβ the dentry being looked up indir, aka the thing we're trying to find in there π
π DESCRIPTION π
okay so here's the vibe check: this function is for the ->lookup and ->atomic_open methods of filesystems that handle filename encryption and no-key name encoding themselves β meaning they literally can't use fscrypt_prepare_lookup. like, they're built different, they do it their own way, respect π
so what does she actually do? like fscrypt_prepare_lookup, this function will try to set up the directory's encryption key π and it will set DCACHE_NOKEY_NAME on the dentry if the key is unavailable. periodt.
but β and this is the main character difference β this function does not set up a struct fscrypt_name for the filename. nope! not her job! someone else's problem! π
β RETURN β
0on success π-errnoon error π
wait, before you panic: the encryption key being unavailable is not considered an error. nope, not a vibe killer. also β it's not an error if the encryption policy is unsupported by this kernel either! that's just treated like the key being unavailable, so that files can still be deleted ποΈβ¨ (yes that's intentional, she's being nice so you can still clean up)
π SEE ALSO π
- Kernel file
./fs/crypto/hooks.cπ₯ fscrypt_file_open(9)fscrypt_prepare_setflags(9)fscrypt_prepare_symlink(9)fscrypt_get_symlink(9)fscrypt_symlink_getattr(9)
like, go read the whole friend group honestly, they're all iconic π
π«Ά and that's the page! brought to you by the fine folks over at ./fs/crypto, dated October 2026 β ty for coming to my ted talk, mwah ππΈ
π¦ 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