__d_lookup_rcu(9)
πΈ __d_lookup_rcu(9) β Kernel API Manual πΈ
okay so this is the manual for __d_lookup_rcu(9), and itβs giving lowkey legendary dentry-detective energy π΅οΈββοΈπ
buckle up bestie.
π NAME π
__d_lookup_rcu β search for a dentry (racy, store-free)
β¨ SYNOPSIS β¨
struct dentry * __d_lookup_rcu (const struct dentry *parent , const
struct qstr *name , unsigned *seqp );
π ARGUMENTS π
parentβ parent dentry πnameβ qstr of name we wish to find πseqpβ returnsd_seqvalue at the point where the dentry was found β¨
π¦ RETURN π¦
dentry, or NULL π thatβs the whole vibe check.
π DESCRIPTION π
__d_lookup_rcu is the dcache lookup function for rcu-walk name resolution (store-free path walking) design described in Documentation/filesystems/path-lookup.txt. πβ¨
This is not to be used outside core vfs. π ββοΈ no cap.
__d_lookup_rcu must only be used in rcu-walk mode, ie. with vfsmount lock held, and rcu_read_lock held. The returned dentry must not be stored into without taking d_lock and checking d_seq sequence count against seq returned here. π
Alternatively, __d_lookup_rcu may be called again to look up the child of the returned dentry, so long as its parent's seqlock is checked after the child is looked up. Thus, an interlocking stepping of sequence lock checks is formed, giving integrity down the path walk. π§ββοΈ
NOTE! The caller has to check the resulting dentry against the sequence number we've returned before using any of the resulting dentry state! πβ οΈ
π SEE ALSO π
Kernel file ./fs/dcache.c is the home base π β go hang with these:
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(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)
okurrr thatβs the page π
β¨ source/version is ./fs, itβs dated October 2026, and itβs all about __d_lookup_rcu(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