suse man page for d_lookup

Query: d_lookup

OS: suse

Section: 9

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

D_LOOKUP(9)							   The Linux VFS						       D_LOOKUP(9)

NAME
d_lookup - search for a dentry
SYNOPSIS
struct dentry * d_lookup(struct dentry * parent, struct qstr * name);
ARGUMENTS
parent parent dentry name qstr of name we wish to find
DESCRIPTION
Searches the children of the parent dentry for the name in question. If the dentry is found its reference count is incremented and the dentry is returned. The caller must use dput to free the entry when it has finished using it. NULL is returned on failure. __d_lookup is dcache_lock free. The hash list is protected using RCU. Memory barriers are used while updating and doing lockless traversal. To avoid races with d_move while rename is happening, d_lock is used. Overflows in memcmp, while d_move, are avoided by keeping the length and name pointer in one structure pointed by d_qstr. rcu_read_lock and rcu_read_unlock are used to disable preemption while lookup is going on. The dentry unused LRU is not updated even if lookup finds the required dentry in there. It is updated in places such as prune_dcache, shrink_dcache_sb, select_parent and __dget_locked. This laziness saves lookup from dcache_lock acquisition. d_lookup is protected against the concurrent renames in some unrelated directory using the seqlockt_t rename_lock.
COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 D_LOOKUP(9)
Related Man Pages
debugfs_create_u32(9) - centos
debugfs_create_u64(9) - centos
debugfs_create_file(9) - centos
securityfs_create_file(9) - centos
debugfs_create_u8(9) - suse
Similar Topics in the Unix Linux Community
named caching server odd lookup issue!
Script help needed(lookup 2 text files)
Help required on Length based lookup