diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-04 22:50:27 -0400 |
commit | d932cb7e630cae3b6b5307b767d296ff1a597c5e (patch) | |
tree | f930d068a12a256fabef0864bcdf8e85f095369e /net/sunrpc/svc.c | |
parent | 73b59a3b1c09e4bfc678400b77b96134dcfbf112 (diff) | |
parent | f5d635f649607b09b0b4620d25d028fd2b1b7ea5 (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 01ba60a49572..b76a227dd3ad 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -32,9 +32,8 @@ svc_create(struct svc_program *prog, unsigned int bufsize) | |||
32 | int vers; | 32 | int vers; |
33 | unsigned int xdrsize; | 33 | unsigned int xdrsize; |
34 | 34 | ||
35 | if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL))) | 35 | if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) |
36 | return NULL; | 36 | return NULL; |
37 | memset(serv, 0, sizeof(*serv)); | ||
38 | serv->sv_name = prog->pg_name; | 37 | serv->sv_name = prog->pg_name; |
39 | serv->sv_program = prog; | 38 | serv->sv_program = prog; |
40 | serv->sv_nrthreads = 1; | 39 | serv->sv_nrthreads = 1; |
@@ -159,11 +158,10 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv) | |||
159 | struct svc_rqst *rqstp; | 158 | struct svc_rqst *rqstp; |
160 | int error = -ENOMEM; | 159 | int error = -ENOMEM; |
161 | 160 | ||
162 | rqstp = kmalloc(sizeof(*rqstp), GFP_KERNEL); | 161 | rqstp = kzalloc(sizeof(*rqstp), GFP_KERNEL); |
163 | if (!rqstp) | 162 | if (!rqstp) |
164 | goto out; | 163 | goto out; |
165 | 164 | ||
166 | memset(rqstp, 0, sizeof(*rqstp)); | ||
167 | init_waitqueue_head(&rqstp->rq_wait); | 165 | init_waitqueue_head(&rqstp->rq_wait); |
168 | 166 | ||
169 | if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) | 167 | if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) |