kernels/linux-2.4.0/fs/dcache.c
/* This should be called _only_ with dcache_lock held */
This should be called _only_ with dcache_lock held
This should be called _only_ with dcache_lock held
static inline struct dentry * __dget_locked(struct dentry *dentry)
{
	atomic_inc(&dentry->d_count);
	if (atomic_read(&dentry->d_count) == 1) {
		dentry_stat.nr_unused--;
		list_del(&dentry->d_lru);
		INIT_LIST_HEAD(&dentry->d_lru);		
	}
	return dentry;
}
static inline struct dentry * __dget_locked ( struct dentry * dentry ) { atomic_inc ( & dentry -> d_count ) ; if ( atomic_read ( & dentry -> d_count ) == 1 ) { dentry_stat . nr_unused -- ; list_del ( & dentry -> d_lru ) ; INIT_LIST_HEAD ( & dentry -> d_lru ) ; } return dentry ; }
This should be called _only_ with dcache_lock held
This should be called _only_ with dcache_lock held
/* make "list_empty()" work */