write_lock(&file->f_owner.lock); 
int cifs_close(struct inode *inode, struct file *file){	int rc = 0;	int xid;	struct cifs_sb_info *cifs_sb;	struct cifsTconInfo *pTcon;	struct cifsFileInfo *pSMBFile =		(struct cifsFileInfo *)file->private_data;	xid = GetXid();	cifs_sb = CIFS_SB(inode->i_sb);	pTcon = cifs_sb->tcon;	if (pSMBFile) {		pSMBFile->closePend = TRUE;		write_lock(&file->f_owner.lock);		if (pTcon) {			/* no sense reconnecting to close a file that is			   already closed */			if (pTcon->tidStatus != CifsNeedReconnect) {				int timeout = 2;				while((atomic_read(&pSMBFile->wrtPending) != 0)					 && (timeout < 1000) ) {					/* Give write a better chance to get to					server ahead of the close.  We do not					want to add a wait_q here as it would					increase the memory utilization as					the struct would be in each open file,					but this should give enough time to 					clear the socket */					cERROR(1,("close with pending writes"));					msleep(timeout);					timeout *= 4;				} 				write_unlock(&file->f_owner.lock);				rc = CIFSSMBClose(xid, pTcon,						  pSMBFile->netfid);				write_lock(&file->f_owner.lock);			}		}		write_lock(&GlobalSMBSeslock);		list_del(&pSMBFile->flist);		list_del(&pSMBFile->tlist);		write_unlock(&GlobalSMBSeslock);		write_unlock(&file->f_owner.lock);		kfree(pSMBFile->search_resume_name);		kfree(file->private_data);		file->private_data = NULL;	} else		rc = -EBADF;	if (list_empty(&(CIFS_I(inode)->openFileList))) {		cFYI(1, ("closing last open instance for inode %p", inode));		/* if the file is not open we do not know if we can cache info		   on this inode, much less write behind and read ahead */		CIFS_I(inode)->clientCanCacheRead = FALSE;		CIFS_I(inode)->clientCanCacheAll  = FALSE;	}	if ((rc ==0) && CIFS_I(inode)->write_behind_rc)		rc = CIFS_I(inode)->write_behind_rc;	FreeXid(xid);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c119b87d596cdd99ac20095ae2ae90b525418605/file.c/clean/fs/cifs/file.c