diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/readdir.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 3fab8ed697d1..b80b0fc1c4c4 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -432,14 +432,11 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
432 | 432 | ||
433 | if(file->private_data == NULL) { | 433 | if(file->private_data == NULL) { |
434 | file->private_data = | 434 | file->private_data = |
435 | kmalloc(sizeof(struct cifsFileInfo),GFP_KERNEL); | 435 | kzalloc(sizeof(struct cifsFileInfo),GFP_KERNEL); |
436 | } | 436 | } |
437 | 437 | ||
438 | if(file->private_data == NULL) { | 438 | if(file->private_data == NULL) |
439 | return -ENOMEM; | 439 | return -ENOMEM; |
440 | } else { | ||
441 | memset(file->private_data,0,sizeof(struct cifsFileInfo)); | ||
442 | } | ||
443 | cifsFile = file->private_data; | 440 | cifsFile = file->private_data; |
444 | cifsFile->invalidHandle = TRUE; | 441 | cifsFile->invalidHandle = TRUE; |
445 | cifsFile->srch_inf.endOfSearch = FALSE; | 442 | cifsFile->srch_inf.endOfSearch = FALSE; |