summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorJeff Layton2012-09-19 15:22:34 +0200
committerSteve French2012-09-25 04:46:32 +0200
commit5819575ec6b82345e1a21a960d381c699a91c700 (patch)
tree9ffe9d41ddbc8009c7ecbf132533d5d1315f0f13 /fs/cifs/file.c
parentcifs: convert async read code to use pages array without kmapping (diff)
downloadkernel-qcow2-linux-5819575ec6b82345e1a21a960d381c699a91c700.tar.gz
kernel-qcow2-linux-5819575ec6b82345e1a21a960d381c699a91c700.tar.xz
kernel-qcow2-linux-5819575ec6b82345e1a21a960d381c699a91c700.zip
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>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index f3f1b1098a6c..2421ec28df14 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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);
}