diff options
| -rw-r--r-- | fs/squashfs/zlib_wrapper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 195b0d035e9b..517688b32ffa 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
| 27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 28 | #include <linux/zlib.h> | 28 | #include <linux/zlib.h> |
| 29 | #include <linux/vmalloc.h> | ||
| 29 | 30 | ||
| 30 | #include "squashfs_fs.h" | 31 | #include "squashfs_fs.h" |
| 31 | #include "squashfs_fs_sb.h" | 32 | #include "squashfs_fs_sb.h" |
| @@ -37,8 +38,7 @@ static void *zlib_init(struct squashfs_sb_info *dummy, void *buff, int len) | |||
| 37 | z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL); | 38 | z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL); |
| 38 | if (stream == NULL) | 39 | if (stream == NULL) |
| 39 | goto failed; | 40 | goto failed; |
| 40 | stream->workspace = kmalloc(zlib_inflate_workspacesize(), | 41 | stream->workspace = vmalloc(zlib_inflate_workspacesize()); |
| 41 | GFP_KERNEL); | ||
| 42 | if (stream->workspace == NULL) | 42 | if (stream->workspace == NULL) |
| 43 | goto failed; | 43 | goto failed; |
| 44 | 44 | ||
| @@ -56,7 +56,7 @@ static void zlib_free(void *strm) | |||
| 56 | z_stream *stream = strm; | 56 | z_stream *stream = strm; |
| 57 | 57 | ||
| 58 | if (stream) | 58 | if (stream) |
| 59 | kfree(stream->workspace); | 59 | vfree(stream->workspace); |
| 60 | kfree(stream); | 60 | kfree(stream); |
| 61 | } | 61 | } |
| 62 | 62 | ||
