d_delete(9)
π d_delete(9) β the Kernel API Manual, bestie edition π
Okay so picture this: it's giving kernel API manual, it's giving dentry lore, and honestly? We're obsessed. This is d_delete, a function so iconic it got its own page. Let's get into it β¨
πΈ NAME πΈ
d_delete β delete a dentry πβ¨
π¦ SYNOPSIS π¦
void d_delete (struct dentry * dentry );
Like, that's the whole signature. void in, void out, no return value to worry your pretty little head about π«Ά
π ARGUMENTS π
dentryβ the dentry you're deleting. That's it. That's the argument. She's the main character of this whole operation π
π DESCRIPTION π
So here's the tea β: d_delete turns that dentry into a negative dentry if it possibly can. Keyword if possible β sometimes the vibe just isn't right and it can't do it.
And if it can't? It instead removes the dentry from the hash queues, so it can be deleted later. Lowkey a "not right now but we'll circle back" situation π
That's literally the entire description, no notes, she's efficient π
β SEE ALSO β
Kernel file ./fs/dcache.c β and like, a whole friend group of related functions, fr fr:
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)shrink_dcache_tree(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_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
Like, the whole dcache squad came out for this one β iykyk πΈ
Ngl bestie, that if possible in the description is doing a lot of heavy lifting. Pay attention to it π
mwah π that's the page! Brought to you from ./fs in the Kernel API Manual, dated October 2026, and still titled d_delete(9) because we respect the branding. Slay, stay safe, and go delete a dentry responsibly π§ββοΈπ
π¦ 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