diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-09-27 04:49:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:10 -0400 |
commit | f8314dc60ccba7e41f425048c4160dc7f63377d5 (patch) | |
tree | 4e361a6e93dc7f64da0244e5a0dfef1fface0ddb /fs/lockd/svcsubs.c | |
parent | 32c2d2bc4bed61323f14f2a7d69ccbd567253d8a (diff) |
[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Jffs2-bit-acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/lockd/svcsubs.c')
-rw-r--r-- | fs/lockd/svcsubs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 01b4db9e5466..a92dd98f8401 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -100,11 +100,10 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, | |||
100 | nlm_debug_print_fh("creating file for", f); | 100 | nlm_debug_print_fh("creating file for", f); |
101 | 101 | ||
102 | nfserr = nlm_lck_denied_nolocks; | 102 | nfserr = nlm_lck_denied_nolocks; |
103 | file = (struct nlm_file *) kmalloc(sizeof(*file), GFP_KERNEL); | 103 | file = kzalloc(sizeof(*file), GFP_KERNEL); |
104 | if (!file) | 104 | if (!file) |
105 | goto out_unlock; | 105 | goto out_unlock; |
106 | 106 | ||
107 | memset(file, 0, sizeof(*file)); | ||
108 | memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); | 107 | memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); |
109 | file->f_hash = hash; | 108 | file->f_hash = hash; |
110 | init_MUTEX(&file->f_sema); | 109 | init_MUTEX(&file->f_sema); |