direntry->d_inode->i_mode |= S_IFDIR; 
int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode){	int rc = 0;	int xid;	struct cifs_sb_info *cifs_sb;	struct cifsTconInfo *pTcon;	char *full_path = NULL;	struct inode *newinode = NULL;	cFYI(1, ("In cifs_mkdir, mode = 0x%x inode = 0x%p", mode, inode));	xid = GetXid();	cifs_sb = CIFS_SB(inode->i_sb);	pTcon = cifs_sb->tcon;	down(&inode->i_sb->s_vfs_rename_sem);	full_path = build_path_from_dentry(direntry);	up(&inode->i_sb->s_vfs_rename_sem);	if (full_path == NULL) {		FreeXid(xid);		return -ENOMEM;	}	/* BB add setting the equivalent of mode via CreateX w/ACLs */	rc = CIFSSMBMkDir(xid, pTcon, full_path, cifs_sb->local_nls,			  cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);	if (rc) {		cFYI(1, ("cifs_mkdir returned 0x%x ", rc));		d_drop(direntry);	} else {		inode->i_nlink++;		if (pTcon->ses->capabilities & CAP_UNIX)			rc = cifs_get_inode_info_unix(&newinode, full_path,						      inode->i_sb,xid);		else			rc = cifs_get_inode_info(&newinode, full_path, NULL,						 inode->i_sb,xid);		if (pTcon->nocase)			direntry->d_op = &cifs_ci_dentry_ops;		else			direntry->d_op = &cifs_dentry_ops;		d_instantiate(direntry, newinode);		if (direntry->d_inode)			direntry->d_inode->i_nlink = 2;		if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)			if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {				CIFSSMBUnixSetPerms(xid, pTcon, full_path,						    mode,						    (__u64)current->euid,						    (__u64)current->egid,						    0 /* dev_t */,						    cifs_sb->local_nls,						    cifs_sb->mnt_cifs_flags &						    CIFS_MOUNT_MAP_SPECIAL_CHR);			} else {				CIFSSMBUnixSetPerms(xid, pTcon, full_path,						    mode, (__u64)-1,						    (__u64)-1, 0 /* dev_t */,						    cifs_sb->local_nls,						    cifs_sb->mnt_cifs_flags & 						    CIFS_MOUNT_MAP_SPECIAL_CHR);			}		else {			/* BB to be implemented via Windows secrty descriptors			   eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,						 -1, -1, local_nls); */			if(direntry->d_inode) {				direntry->d_inode->i_mode = mode;				if(cifs_sb->mnt_cifs_flags & 				     CIFS_MOUNT_SET_UID) {					direntry->d_inode->i_uid = 						current->fsuid;					direntry->d_inode->i_gid = 						current->fsgid;				}			}		}	}	kfree(full_path);	FreeXid(xid);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/25741b3e43151bc207dd2b850b0bb157c442682b/inode.c/buggy/fs/cifs/inode.c