diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-21 17:33:09 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-02-21 17:33:09 -0500 |
commit | a048d7a8704b35ff6372fdf5eedd4533f37b1885 (patch) | |
tree | 7d7bae306ef80fe4a99d21da404cf8c4f084ac37 /fs/cifs/misc.c | |
parent | e601ef22bc5ec9332c8d785533895ee81c834b8a (diff) |
[CIFS] Convert remaining places in fs/cifs from
kmalloc/memset to simpler kzalloc usage
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 812c6bb0fe38..0f3ebad09d3e 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -72,10 +72,9 @@ sesInfoAlloc(void) | |||
72 | struct cifsSesInfo *ret_buf; | 72 | struct cifsSesInfo *ret_buf; |
73 | 73 | ||
74 | ret_buf = | 74 | ret_buf = |
75 | (struct cifsSesInfo *) kmalloc(sizeof (struct cifsSesInfo), | 75 | (struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo), |
76 | GFP_KERNEL); | 76 | GFP_KERNEL); |
77 | if (ret_buf) { | 77 | if (ret_buf) { |
78 | memset(ret_buf, 0, sizeof (struct cifsSesInfo)); | ||
79 | write_lock(&GlobalSMBSeslock); | 78 | write_lock(&GlobalSMBSeslock); |
80 | atomic_inc(&sesInfoAllocCount); | 79 | atomic_inc(&sesInfoAllocCount); |
81 | ret_buf->status = CifsNew; | 80 | ret_buf->status = CifsNew; |
@@ -110,10 +109,9 @@ tconInfoAlloc(void) | |||
110 | { | 109 | { |
111 | struct cifsTconInfo *ret_buf; | 110 | struct cifsTconInfo *ret_buf; |
112 | ret_buf = | 111 | ret_buf = |
113 | (struct cifsTconInfo *) kmalloc(sizeof (struct cifsTconInfo), | 112 | (struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo), |
114 | GFP_KERNEL); | 113 | GFP_KERNEL); |
115 | if (ret_buf) { | 114 | if (ret_buf) { |
116 | memset(ret_buf, 0, sizeof (struct cifsTconInfo)); | ||
117 | write_lock(&GlobalSMBSeslock); | 115 | write_lock(&GlobalSMBSeslock); |
118 | atomic_inc(&tconInfoAllocCount); | 116 | atomic_inc(&tconInfoAllocCount); |
119 | list_add(&ret_buf->cifsConnectionList, | 117 | list_add(&ret_buf->cifsConnectionList, |