D_LOOKUP

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

d_lookup - search for a dentry  

SYNOPSIS

"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 d_put 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_move_count 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.

d_lru list is not updated, which can leave non-zero d_count dentries around in d_lru list.

d_lookup is protected against the concurrent renames in some unrelated directory using the seqlockt_t rename_lock.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 06:20:44 GMT, October 06, 2005