cifs: replace kvec array in readdata with a single kvec

The array is no longer needed. We just need a single kvec to hold the
header for signature checking.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
Jeff Layton
2012-09-19 06:22:34 -07:00
committed by Steve French
父節點 8321fec436
當前提交 5819575ec6
共有 4 個文件被更改,包括 21 次插入32 次删除

查看文件

@@ -2413,11 +2413,6 @@ static struct cifs_readdata *
cifs_readdata_alloc(unsigned int nr_pages, work_func_t complete)
{
struct cifs_readdata *rdata;
struct kvec *iov;
iov = kzalloc(sizeof(*iov) * (nr_pages + 1), GFP_KERNEL);
if (!iov)
return (struct cifs_readdata *)iov;
rdata = kzalloc(sizeof(*rdata) + (sizeof(struct page *) * nr_pages),
GFP_KERNEL);
@@ -2426,9 +2421,6 @@ cifs_readdata_alloc(unsigned int nr_pages, work_func_t complete)
INIT_LIST_HEAD(&rdata->list);
init_completion(&rdata->done);
INIT_WORK(&rdata->work, complete);
rdata->iov = iov;
} else {
kfree(iov);
}
return rdata;
@@ -2443,7 +2435,6 @@ cifs_readdata_release(struct kref *refcount)
if (rdata->cfile)
cifsFileInfo_put(rdata->cfile);
kfree(rdata->iov);
kfree(rdata);
}