diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index fed55e3c53df..ddd11fa15528 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -48,13 +48,14 @@ build_path_from_dentry(struct dentry *direntry) | |||
48 | struct dentry *temp; | 48 | struct dentry *temp; |
49 | int namelen = 0; | 49 | int namelen = 0; |
50 | char *full_path; | 50 | char *full_path; |
51 | char dirsep = CIFS_DIR_SEP(CIFS_SB(direntry->d_sb)); | 51 | char dirsep; |
52 | 52 | ||
53 | if(direntry == NULL) | 53 | if(direntry == NULL) |
54 | return NULL; /* not much we can do if dentry is freed and | 54 | return NULL; /* not much we can do if dentry is freed and |
55 | we need to reopen the file after it was closed implicitly | 55 | we need to reopen the file after it was closed implicitly |
56 | when the server crashed */ | 56 | when the server crashed */ |
57 | 57 | ||
58 | dirsep = CIFS_DIR_SEP(CIFS_SB(direntry->d_sb)); | ||
58 | cifs_bp_rename_retry: | 59 | cifs_bp_rename_retry: |
59 | for (temp = direntry; !IS_ROOT(temp);) { | 60 | for (temp = direntry; !IS_ROOT(temp);) { |
60 | namelen += (1 + temp->d_name.len); | 61 | namelen += (1 + temp->d_name.len); |
@@ -255,12 +256,10 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
255 | CIFSSMBClose(xid, pTcon, fileHandle); | 256 | CIFSSMBClose(xid, pTcon, fileHandle); |
256 | } else if(newinode) { | 257 | } else if(newinode) { |
257 | pCifsFile = | 258 | pCifsFile = |
258 | kmalloc(sizeof (struct cifsFileInfo), GFP_KERNEL); | 259 | kzalloc(sizeof (struct cifsFileInfo), GFP_KERNEL); |
259 | 260 | ||
260 | if(pCifsFile == NULL) | 261 | if(pCifsFile == NULL) |
261 | goto cifs_create_out; | 262 | goto cifs_create_out; |
262 | memset((char *)pCifsFile, 0, | ||
263 | sizeof (struct cifsFileInfo)); | ||
264 | pCifsFile->netfid = fileHandle; | 263 | pCifsFile->netfid = fileHandle; |
265 | pCifsFile->pid = current->tgid; | 264 | pCifsFile->pid = current->tgid; |
266 | pCifsFile->pInode = newinode; | 265 | pCifsFile->pInode = newinode; |