kernels/linux-2.4.0/fs/smbfs/dir.c
/*
 * This is the callback when the dcache has a lookup hit.
 */
This is the callback when the dcache has a lookup hit.
This is the callback when the dcache has a lookup hit .
static int
smb_lookup_validate(struct dentry * dentry, int flags)
{
	struct inode * inode = dentry->d_inode;
	unsigned long age = jiffies - dentry->d_time;
	int valid;
	valid = (age <= SMBFS_MAX_AGE);
#ifdef SMBFS_DEBUG_VERBOSE
	if (!valid)
		VERBOSE("%s/%s not valid, age=%lu\n", 
			DENTRY_PATH(dentry), age);
#endif
	if (inode) {
		lock_kernel();
		if (is_bad_inode(inode)) {
			PARANOIA("%s/%s has dud inode\n", DENTRY_PATH(dentry));
			valid = 0;
		} else if (!valid)
			valid = (smb_revalidate_inode(dentry) == 0);
		unlock_kernel();
	} else {
	}
	return valid;
}
static int smb_lookup_validate ( struct dentry * dentry , int flags ) { struct inode * inode = dentry -> d_inode ; unsigned long age = jiffies - dentry -> d_time ; int valid ; valid = ( age <= SMBFS_MAX_AGE ) ; #ifdef SMBFS_DEBUG_VERBOSE if ( ! valid ) VERBOSE ( " \n " , DENTRY_PATH ( dentry ) , age ) ; #endif if ( inode ) { lock_kernel ( ) ; if ( is_bad_inode ( inode ) ) { PARANOIA ( " \n " , DENTRY_PATH ( dentry ) ) ; valid = 0 ; } else if ( ! valid ) valid = ( smb_revalidate_inode ( dentry ) == 0 ) ; unlock_kernel ( ) ; } else { } return valid ; }
This is the callback when the dcache has a lookup hit.
This is the callback when the dcache has a lookup hit .
/*
	 * The default validation is based on dentry age:
	 * we believe in dentries for 5 seconds.  (But each
	 * successful server lookup renews the timestamp.)
	 */ /*
		 * What should we do for negative dentries?
		 */