summaryrefslogtreecommitdiff
path: root/crypto/deflate.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-05 23:23:37 -0700
committerDavid S. Miller <davem@davemloft.net>2011-07-05 23:23:37 -0700
commite12fe68ce34d60c04bb1ddb1d3cc5c3022388fe4 (patch)
tree83c0e192ccaa4752c80b6131a7d0aa8272b5d0d0 /crypto/deflate.c
parent7329f0d58de01878d9ce4f0be7a76e136f223eef (diff)
parent712ae51afd55b20c04c5383d02ba5d10233313b1 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'crypto/deflate.c')
-rw-r--r--crypto/deflate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/deflate.c b/crypto/deflate.c
index b5ccae29be74..b0165ecad0c5 100644
--- a/crypto/deflate.c
+++ b/crypto/deflate.c
@@ -32,7 +32,6 @@
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/net.h>
-#include <linux/slab.h>
#define DEFLATE_DEF_LEVEL Z_DEFAULT_COMPRESSION
#define DEFLATE_DEF_WINBITS 11
@@ -73,7 +72,7 @@ static int deflate_decomp_init(struct deflate_ctx *ctx)
int ret = 0;
struct z_stream_s *stream = &ctx->decomp_stream;
- stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
+ stream->workspace = vzalloc(zlib_inflate_workspacesize());
if (!stream->workspace) {
ret = -ENOMEM;
goto out;
@@ -86,7 +85,7 @@ static int deflate_decomp_init(struct deflate_ctx *ctx)
out:
return ret;
out_free:
- kfree(stream->workspace);
+ vfree(stream->workspace);
goto out;
}
@@ -99,7 +98,7 @@ static void deflate_comp_exit(struct deflate_ctx *ctx)
static void deflate_decomp_exit(struct deflate_ctx *ctx)
{
zlib_inflateEnd(&ctx->decomp_stream);
- kfree(ctx->decomp_stream.workspace);
+ vfree(ctx->decomp_stream.workspace);
}
static int deflate_init(struct crypto_tfm *tfm)