diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 15:34:47 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-01-24 15:34:47 -0500 |
commit | 0a0fc0ddbe732779366ab6b1b879f62195e65967 (patch) | |
tree | 7b42490a676cf39ae0691b6859ecf7fd410f229b /fs/smbfs/request.c | |
parent | 4d5dbd0945d9e0833dd7964a3d6ee33157f7cc7a (diff) | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'fs/smbfs/request.c')
-rw-r--r-- | fs/smbfs/request.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index a0f296d9928a..c71c375863cc 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c | |||
@@ -68,7 +68,7 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server, | |||
68 | goto out; | 68 | goto out; |
69 | 69 | ||
70 | if (bufsize > 0) { | 70 | if (bufsize > 0) { |
71 | buf = smb_kmalloc(bufsize, GFP_NOFS); | 71 | buf = kmalloc(bufsize, GFP_NOFS); |
72 | if (!buf) { | 72 | if (!buf) { |
73 | kmem_cache_free(req_cachep, req); | 73 | kmem_cache_free(req_cachep, req); |
74 | return NULL; | 74 | return NULL; |
@@ -124,9 +124,8 @@ static void smb_free_request(struct smb_request *req) | |||
124 | { | 124 | { |
125 | atomic_dec(&req->rq_server->nr_requests); | 125 | atomic_dec(&req->rq_server->nr_requests); |
126 | if (req->rq_buffer && !(req->rq_flags & SMB_REQ_STATIC)) | 126 | if (req->rq_buffer && !(req->rq_flags & SMB_REQ_STATIC)) |
127 | smb_kfree(req->rq_buffer); | 127 | kfree(req->rq_buffer); |
128 | if (req->rq_trans2buffer) | 128 | kfree(req->rq_trans2buffer); |
129 | smb_kfree(req->rq_trans2buffer); | ||
130 | kmem_cache_free(req_cachep, req); | 129 | kmem_cache_free(req_cachep, req); |
131 | } | 130 | } |
132 | 131 | ||
@@ -183,8 +182,7 @@ static int smb_setup_request(struct smb_request *req) | |||
183 | req->rq_err = 0; | 182 | req->rq_err = 0; |
184 | req->rq_errno = 0; | 183 | req->rq_errno = 0; |
185 | req->rq_fragment = 0; | 184 | req->rq_fragment = 0; |
186 | if (req->rq_trans2buffer) | 185 | kfree(req->rq_trans2buffer); |
187 | smb_kfree(req->rq_trans2buffer); | ||
188 | 186 | ||
189 | return 0; | 187 | return 0; |
190 | } | 188 | } |
@@ -647,10 +645,9 @@ static int smb_recv_trans2(struct smb_sb_info *server, struct smb_request *req) | |||
647 | goto out_too_long; | 645 | goto out_too_long; |
648 | 646 | ||
649 | req->rq_trans2bufsize = buf_len; | 647 | req->rq_trans2bufsize = buf_len; |
650 | req->rq_trans2buffer = smb_kmalloc(buf_len, GFP_NOFS); | 648 | req->rq_trans2buffer = kzalloc(buf_len, GFP_NOFS); |
651 | if (!req->rq_trans2buffer) | 649 | if (!req->rq_trans2buffer) |
652 | goto out_no_mem; | 650 | goto out_no_mem; |
653 | memset(req->rq_trans2buffer, 0, buf_len); | ||
654 | 651 | ||
655 | req->rq_parm = req->rq_trans2buffer; | 652 | req->rq_parm = req->rq_trans2buffer; |
656 | req->rq_data = req->rq_trans2buffer + parm_tot; | 653 | req->rq_data = req->rq_trans2buffer + parm_tot; |