shrink_dcache_tree(9)
π shrink_dcache_tree β prune dcache
okay bestie, so we're in the kernel API manual (shrink_dcache_tree(9)) and this one is a whole function, not a command. it lives over in ./fs and honestly? iconic of it.
β¨ NAME β¨
shrink_dcache_tree β prune dcache πΈ
like, literally just prune the dcache. that's the vibe. no cap.
π«Ά SYNOPSIS π«Ά
void shrink_dcache_tree (struct dentry *parent , bool for_umount );
returns nothing (void), takes two things, and it's giving "small function, big responsibility" energy fr fr.
π ARGUMENTS π
parentβ the parent of the entries we're gonna prune. yes she's the main character here, everything happens under her πfor_umountβ abool. set it to true if we want to unpin the persistent ones. that's the whole lore. π
π DESCRIPTION π
Prune the dcache to remove unused children of the parent dentry. that's it. that's the function. she goes in, she clears out the unused children, she leaves. lowkey obsessed with how clean that is β¨
π₯ SEE ALSO π₯
the kernel file ./fs/dcache.c and literally the entire dcache friend group β everyone's invited, it's a whole group chat:
d_drop(9)dentry_kill(9)__move_to_shrink_list(9)d_find_any_alias(9)d_find_alias(9)prune_dcache_sb(9)shrink_dcache_sb(9)enum d_walk_ret(9)d_walk(9)path_has_submounts(9)d_invalidate(9)__d_alloc(9)d_alloc(9)d_alloc_pseudo(9)d_instantiate(9)d_obtain_alias(9)d_obtain_root(9)d_add_ci(9)d_same_name(9)__d_lookup_rcu(9)d_lookup(9)__d_lookup(9)d_hash_and_lookup(9)d_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
okay that's the page!! π this one's from./fs, dated October 2026, and it'sshrink_dcache_tree(9)β go prune some unused children bestie, ily, bye ππ§
π¦ 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