d_find_alias(9)
β¨ d_find_alias(9) β Kernel API Manual edition β¨
okay so bestie, this is the d_find_alias(9) page from the Kernel API Manual, and it is literally giving βgrab a hashed alias of inodeβ energy. π
πΈ NAME πΈ
d_find_alias β grab a hashed alias of inode
π SYNOPSIS π
struct dentry * d_find_alias (struct inode *inode );
π¦ ARGUMENTS π¦
inodeβ the inode in question, bestie. π«Ά
π₯ DESCRIPTION π₯
Okay so if inode has a hashed alias, or if it is a directory and has any alias, this function acquires the reference to the alias and returns it. Slay. Otherwise it returns NULL. No cap, that is the whole mood.
Notice that if inode is a directory there can be only one alias, and it can be unhashed only if:
- it has no children, or
- it is the root of a filesystem, or
- the directory was renamed and
d_revalidatewas the first vfs operation to notice.
Also, if the inode has an IS_ROOT, DCACHE_DISCONNECTED alias, then prefer any other hashed alias over that one. Iconic little preference rule, honestly.
π SEE ALSO π
Kernel file ./fs/dcache.c and the whole dcache group chat:
d_drop(9)dentry_kill(9)__move_to_shrink_list(9)d_find_any_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_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
π«Ά thatβs the whole page, bestie β cute footer sign-off: source/version ./fs, date October 2026, page d_find_alias(9). periodt. π
π¦ 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