struct dentry {
atomic_t d_count; unsignedint d_flags;/* protected by d_lock */
spinlock_t d_lock;/* per dentry lock */ int d_mounted; struct inode *d_inode;/* Where the name belongs to - NULL is
* negative */ /*
* The next three fields are touched by __d_lookup. Place them here
* so they all fit in a cache line.
*/ struct hlist_node d_hash;/* lookup hash list */ struct dentry *d_parent;/* parent directory */ struct qstr d_name;
struct list_head d_lru;/* LRU list */ /*
* d_child and d_rcu can share memory
*/ union{ struct list_head d_child;/* child of parent list */ struct rcu_head d_rcu; } d_u; struct list_head d_subdirs;/* our children */ struct list_head d_alias;/* inode alias list */ unsignedlong d_time;/* used by d_revalidate */ conststruct dentry_operations *d_op; struct super_block *d_sb;/* The root of the dentry tree */ void*d_fsdata;/* fs-specific data */
unsignedchar d_iname[DNAME_INLINE_LEN_MIN];/* small names */ };
/* the dentry parameter passed to d_hash and d_compare is the parent
* directory of the entries to be compared. It is used in case these
* functions need any directory specific information for determining
* equivalency classes. Using the dentry itself might not work, as it
* might be a negative dentry which has no information associated with
* it */
/*
locking rules:
big lock dcache_lock d_lock may block
d_revalidate: no no no yes
d_hash no no no yes
d_compare: no yes yes no
d_delete: no yes no no
d_release: no no no yes
d_iput: no no no yes
*/