diff options
Diffstat (limited to 'net/9p/client.c')
-rw-r--r-- | net/9p/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 305a4e719b03..9eadadb0a698 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -248,10 +248,8 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag, int max_size) | |||
248 | init_waitqueue_head(req->wq); | 248 | init_waitqueue_head(req->wq); |
249 | req->tc = kmalloc(sizeof(struct p9_fcall) + alloc_msize, | 249 | req->tc = kmalloc(sizeof(struct p9_fcall) + alloc_msize, |
250 | GFP_NOFS); | 250 | GFP_NOFS); |
251 | req->tc->capacity = alloc_msize; | ||
252 | req->rc = kmalloc(sizeof(struct p9_fcall) + alloc_msize, | 251 | req->rc = kmalloc(sizeof(struct p9_fcall) + alloc_msize, |
253 | GFP_NOFS); | 252 | GFP_NOFS); |
254 | req->rc->capacity = alloc_msize; | ||
255 | if ((!req->tc) || (!req->rc)) { | 253 | if ((!req->tc) || (!req->rc)) { |
256 | printk(KERN_ERR "Couldn't grow tag array\n"); | 254 | printk(KERN_ERR "Couldn't grow tag array\n"); |
257 | kfree(req->tc); | 255 | kfree(req->tc); |
@@ -261,6 +259,8 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag, int max_size) | |||
261 | req->wq = NULL; | 259 | req->wq = NULL; |
262 | return ERR_PTR(-ENOMEM); | 260 | return ERR_PTR(-ENOMEM); |
263 | } | 261 | } |
262 | req->tc->capacity = alloc_msize; | ||
263 | req->rc->capacity = alloc_msize; | ||
264 | req->tc->sdata = (char *) req->tc + sizeof(struct p9_fcall); | 264 | req->tc->sdata = (char *) req->tc + sizeof(struct p9_fcall); |
265 | req->rc->sdata = (char *) req->rc + sizeof(struct p9_fcall); | 265 | req->rc->sdata = (char *) req->rc + sizeof(struct p9_fcall); |
266 | } | 266 | } |