diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/jffs2/compr_zlib.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'fs/jffs2/compr_zlib.c')
-rw-r--r-- | fs/jffs2/compr_zlib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 97fc45de6f81..5a001020c542 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -40,12 +40,13 @@ static z_stream inf_strm, def_strm; | |||
40 | 40 | ||
41 | static int __init alloc_workspaces(void) | 41 | static int __init alloc_workspaces(void) |
42 | { | 42 | { |
43 | def_strm.workspace = vmalloc(zlib_deflate_workspacesize()); | 43 | def_strm.workspace = vmalloc(zlib_deflate_workspacesize(MAX_WBITS, |
44 | MAX_MEM_LEVEL)); | ||
44 | if (!def_strm.workspace) { | 45 | if (!def_strm.workspace) { |
45 | printk(KERN_WARNING "Failed to allocate %d bytes for deflate workspace\n", zlib_deflate_workspacesize()); | 46 | printk(KERN_WARNING "Failed to allocate %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL)); |
46 | return -ENOMEM; | 47 | return -ENOMEM; |
47 | } | 48 | } |
48 | D1(printk(KERN_DEBUG "Allocated %d bytes for deflate workspace\n", zlib_deflate_workspacesize())); | 49 | D1(printk(KERN_DEBUG "Allocated %d bytes for deflate workspace\n", zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL))); |
49 | inf_strm.workspace = vmalloc(zlib_inflate_workspacesize()); | 50 | inf_strm.workspace = vmalloc(zlib_inflate_workspacesize()); |
50 | if (!inf_strm.workspace) { | 51 | if (!inf_strm.workspace) { |
51 | printk(KERN_WARNING "Failed to allocate %d bytes for inflate workspace\n", zlib_inflate_workspacesize()); | 52 | printk(KERN_WARNING "Failed to allocate %d bytes for inflate workspace\n", zlib_inflate_workspacesize()); |
@@ -68,8 +69,7 @@ static void free_workspaces(void) | |||
68 | 69 | ||
69 | static int jffs2_zlib_compress(unsigned char *data_in, | 70 | static int jffs2_zlib_compress(unsigned char *data_in, |
70 | unsigned char *cpage_out, | 71 | unsigned char *cpage_out, |
71 | uint32_t *sourcelen, uint32_t *dstlen, | 72 | uint32_t *sourcelen, uint32_t *dstlen) |
72 | void *model) | ||
73 | { | 73 | { |
74 | int ret; | 74 | int ret; |
75 | 75 | ||
@@ -136,8 +136,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, | |||
136 | 136 | ||
137 | static int jffs2_zlib_decompress(unsigned char *data_in, | 137 | static int jffs2_zlib_decompress(unsigned char *data_in, |
138 | unsigned char *cpage_out, | 138 | unsigned char *cpage_out, |
139 | uint32_t srclen, uint32_t destlen, | 139 | uint32_t srclen, uint32_t destlen) |
140 | void *model) | ||
141 | { | 140 | { |
142 | int ret; | 141 | int ret; |
143 | int wbits = MAX_WBITS; | 142 | int wbits = MAX_WBITS; |