full_path = build_path_from_dentry(direntry, cifs_sb); 
full_path = build_path_from_dentry(direntry); 
int cifs_revalidate(struct dentry *direntry){	int xid;	int rc = 0;	char *full_path;	struct cifs_sb_info *cifs_sb;	struct cifsInodeInfo *cifsInode;	loff_t local_size;	struct timespec local_mtime;	int invalidate_inode = FALSE;	if (direntry->d_inode == NULL)		return -ENOENT;	cifsInode = CIFS_I(direntry->d_inode);	if (cifsInode == NULL)		return -ENOENT;	/* no sense revalidating inode info on file that no one can write */	if (CIFS_I(direntry->d_inode)->clientCanCacheRead)		return rc;	xid = GetXid();	cifs_sb = CIFS_SB(direntry->d_sb);	/* can not safely grab the rename sem here if rename calls revalidate	   since that would deadlock */	full_path = build_path_from_dentry(direntry, cifs_sb);	if (full_path == NULL) {		FreeXid(xid);		return -ENOMEM;	}	cFYI(1, ("Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "		 "jiffies %ld", full_path, direntry->d_inode,		 direntry->d_inode->i_count.counter, direntry,		 direntry->d_time, jiffies));	if (cifsInode->time == 0) {		/* was set to zero previously to force revalidate */	} else if (time_before(jiffies, cifsInode->time + HZ) &&		   lookupCacheEnabled) {		if ((S_ISREG(direntry->d_inode->i_mode) == 0) ||		    (direntry->d_inode->i_nlink == 1)) {			kfree(full_path);			FreeXid(xid);			return rc;		} else {			cFYI(1, ("Have to revalidate file due to hardlinks"));		}	}	/* save mtime and size */	local_mtime = direntry->d_inode->i_mtime;	local_size = direntry->d_inode->i_size;	if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) {		rc = cifs_get_inode_info_unix(&direntry->d_inode, full_path,					      direntry->d_sb,xid);		if (rc) {			cFYI(1, ("error on getting revalidate info %d", rc));/*			if (rc != -ENOENT)				rc = 0; */	/* BB should we cache info on						   certain errors? */		}	} else {		rc = cifs_get_inode_info(&direntry->d_inode, full_path, NULL,					 direntry->d_sb,xid);		if (rc) {			cFYI(1, ("error on getting revalidate info %d", rc));/*			if (rc != -ENOENT)				rc = 0; */	/* BB should we cache info on						   certain errors? */		}	}	/* should we remap certain errors, access denied?, to zero */	/* if not oplocked, we invalidate inode pages if mtime or file size	   had changed on server */	if (timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) && 	    (local_size == direntry->d_inode->i_size)) {		cFYI(1, ("cifs_revalidate - inode unchanged"));	} else {		/* file may have changed on server */		if (cifsInode->clientCanCacheRead) {			/* no need to invalidate inode pages since we were the			   only ones who could have modified the file and the			   server copy is staler than ours */		} else {			invalidate_inode = TRUE;		}	}	/* can not grab this sem since kernel filesys locking documentation	   indicates i_sem may be taken by the kernel on lookup and rename	   which could deadlock if we grab the i_sem here as well *//*	down(&direntry->d_inode->i_sem);*/	/* need to write out dirty pages here  */	if (direntry->d_inode->i_mapping) {		/* do we need to lock inode until after invalidate completes		   below? */		filemap_fdatawrite(direntry->d_inode->i_mapping);	}	if (invalidate_inode) {		if (direntry->d_inode->i_mapping)			filemap_fdatawait(direntry->d_inode->i_mapping);		/* may eventually have to do this for open files too */		if (list_empty(&(cifsInode->openFileList))) {			/* Has changed on server - flush read ahead pages */			cFYI(1, ("Invalidating read ahead data on "				 "closed file"));			invalidate_remote_inode(direntry->d_inode);		}	}/*	up(&direntry->d_inode->i_sem); */		kfree(full_path);	FreeXid(xid);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7f57356b70dda014ef269135942426e4a852023e/inode.c/clean/fs/cifs/inode.c