summaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorvignesh2007-04-25 14:13:48 +0200
committerSteve French2007-04-25 14:13:48 +0200
commiteaa33a9ac04cf5760cf4e661241db19f4151cf06 (patch)
tree8e761d546e1c5db30943adb38d196d44e9f33b33 /fs/cifs/readdir.c
parent[CIFS] Add IPv6 support (diff)
downloadkernel-qcow2-linux-eaa33a9ac04cf5760cf4e661241db19f4151cf06.tar.gz
kernel-qcow2-linux-eaa33a9ac04cf5760cf4e661241db19f4151cf06.tar.xz
kernel-qcow2-linux-eaa33a9ac04cf5760cf4e661241db19f4151cf06.zip
[CIFS] Replace kmalloc/memset combination with kzalloc
Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c7
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)
if(file->private_data == NULL) {
file->private_data =
- kmalloc(sizeof(struct cifsFileInfo),GFP_KERNEL);
+ kzalloc(sizeof(struct cifsFileInfo),GFP_KERNEL);
}
- if(file->private_data == NULL) {
+ if(file->private_data == NULL)
return -ENOMEM;
- } else {
- memset(file->private_data,0,sizeof(struct cifsFileInfo));
- }
cifsFile = file->private_data;
cifsFile->invalidHandle = TRUE;
cifsFile->srch_inf.endOfSearch = FALSE;