if(*pinode == NULL) 
if (*pinode == NULL) 
int cifs_get_inode_info_unix(struct inode **pinode,	const unsigned char *search_path, struct super_block *sb, int xid){	int rc = 0;	FILE_UNIX_BASIC_INFO findData;	struct cifsTconInfo *pTcon;	struct inode *inode;	struct cifs_sb_info *cifs_sb = CIFS_SB(sb);	char *tmp_path;	pTcon = cifs_sb->tcon;	cFYI(1, (" Getting info on %s ", search_path));	/* could have done a find first instead but this returns more info */	rc = CIFSSMBUnixQPathInfo(xid, pTcon, search_path, &findData,				  cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &					CIFS_MOUNT_MAP_SPECIAL_CHR);/*	dump_mem("\nUnixQPathInfo return data", &findData,		 sizeof(findData)); */	if (rc) {		if (rc == -EREMOTE) {			tmp_path =			    kmalloc(strnlen(pTcon->treeName,					    MAX_TREE_SIZE + 1) +				    strnlen(search_path, MAX_PATHCONF) + 1,				    GFP_KERNEL);			if (tmp_path == NULL) {				return -ENOMEM;			}        		/* have to skip first of the double backslash of			   UNC name */			strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE);			strncat(tmp_path, search_path, MAX_PATHCONF);			rc = connect_to_dfs_path(xid, pTcon->ses,						 /* treename + */ tmp_path,						 cifs_sb->local_nls, 						 cifs_sb->mnt_cifs_flags & 						    CIFS_MOUNT_MAP_SPECIAL_CHR);			kfree(tmp_path);			/* BB fix up inode etc. */		} else if (rc) {			return rc;		}	} else {		struct cifsInodeInfo *cifsInfo;		__u32 type = le32_to_cpu(findData.Type);		__u64 num_of_bytes = le64_to_cpu(findData.NumOfBytes);		__u64 end_of_file = le64_to_cpu(findData.EndOfFile);		/* get new inode */		if (*pinode == NULL) {			*pinode = new_inode(sb);			if(*pinode == NULL) 				return -ENOMEM;			/* Is an i_ino of zero legal? */			/* Are there sanity checks we can use to ensure that			   the server is really filling in that field? */			if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {				(*pinode)->i_ino =					(unsigned long)findData.UniqueId;			} /* note ino incremented to unique num in new_inode */			insert_inode_hash(*pinode);		}		inode = *pinode;		cifsInfo = CIFS_I(inode);		cFYI(1, (" Old time %ld ", cifsInfo->time));		cifsInfo->time = jiffies;		cFYI(1, (" New time %ld ", cifsInfo->time));		/* this is ok to set on every inode revalidate */		atomic_set(&cifsInfo->inUse,1);		inode->i_atime =		    cifs_NTtimeToUnix(le64_to_cpu(findData.LastAccessTime));		inode->i_mtime =		    cifs_NTtimeToUnix(le64_to_cpu				(findData.LastModificationTime));		inode->i_ctime =		    cifs_NTtimeToUnix(le64_to_cpu(findData.LastStatusChange));		inode->i_mode = le64_to_cpu(findData.Permissions);		if (type == UNIX_FILE) {			inode->i_mode |= S_IFREG;		} else if (type == UNIX_SYMLINK) {			inode->i_mode |= S_IFLNK;		} else if (type == UNIX_DIR) {			inode->i_mode |= S_IFDIR;		} else if (type == UNIX_CHARDEV) {			inode->i_mode |= S_IFCHR;			inode->i_rdev = MKDEV(le64_to_cpu(findData.DevMajor),				le64_to_cpu(findData.DevMinor) & MINORMASK);		} else if (type == UNIX_BLOCKDEV) {			inode->i_mode |= S_IFBLK;			inode->i_rdev = MKDEV(le64_to_cpu(findData.DevMajor),				le64_to_cpu(findData.DevMinor) & MINORMASK);		} else if (type == UNIX_FIFO) {			inode->i_mode |= S_IFIFO;		} else if (type == UNIX_SOCKET) {			inode->i_mode |= S_IFSOCK;		}		inode->i_uid = le64_to_cpu(findData.Uid);		inode->i_gid = le64_to_cpu(findData.Gid);		inode->i_nlink = le64_to_cpu(findData.Nlinks);		if(is_size_safe_to_change(cifsInfo)) {		/* can not safely change the file size here if the		   client is writing to it due to potential races */			i_size_write(inode, end_of_file);		/* blksize needs to be multiple of two. So safer to default to		blksize and blkbits set in superblock so 2**blkbits and blksize		will match rather than setting to:		(pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/		/* This seems incredibly stupid but it turns out that i_blocks		   is not related to (i_size / i_blksize), instead 512 byte size		   is required for calculating num blocks */		/* 512 bytes (2**9) is the fake blocksize that must be used */		/* for this calculation */			inode->i_blocks = (512 - 1 + num_of_bytes) >> 9;		}		if (num_of_bytes < end_of_file)			cFYI(1, ("allocation size less than end of file "));		cFYI(1,		     ("Size %ld and blocks %ld",		      (unsigned long) inode->i_size, inode->i_blocks));		if (S_ISREG(inode->i_mode)) {			cFYI(1, (" File inode "));			inode->i_op = &cifs_file_inode_ops;			if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO)				inode->i_fop = &cifs_file_direct_ops;			else				inode->i_fop = &cifs_file_ops;			inode->i_data.a_ops = &cifs_addr_ops;		} else if (S_ISDIR(inode->i_mode)) {			cFYI(1, (" Directory inode"));			inode->i_op = &cifs_dir_inode_ops;			inode->i_fop = &cifs_dir_ops;		} else if (S_ISLNK(inode->i_mode)) {			cFYI(1, (" Symbolic Link inode "));			inode->i_op = &cifs_symlink_inode_ops;		/* tmp_inode->i_fop = */ /* do not need to set to anything */		} else {			cFYI(1, (" Init special inode "));			init_special_inode(inode, inode->i_mode,					   inode->i_rdev);		}	}	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d0d2f2df65ddea9a30ddd117f769bfff65d3fc56/inode.c/buggy/fs/cifs/inode.c