compr_lzo.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | compr_lzo.c (045ead345b53c6186303f1413f90154f3137f457) |
---|---|
1/* 2 * JFFS2 -- Journalling Flash File System, Version 2. 3 * 4 * Copyright © 2007 Nokia Corporation. All rights reserved. 5 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org> 6 * 7 * Created by Richard Purdie <rpurdie@openedhand.com> 8 * --- 19 unchanged lines hidden (view full) --- 28} 29 30static int __init alloc_workspace(void) 31{ 32 lzo_mem = vmalloc(LZO1X_MEM_COMPRESS); 33 lzo_compress_buf = vmalloc(lzo1x_worst_compress(PAGE_SIZE)); 34 35 if (!lzo_mem || !lzo_compress_buf) { | 1/* 2 * JFFS2 -- Journalling Flash File System, Version 2. 3 * 4 * Copyright © 2007 Nokia Corporation. All rights reserved. 5 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org> 6 * 7 * Created by Richard Purdie <rpurdie@openedhand.com> 8 * --- 19 unchanged lines hidden (view full) --- 28} 29 30static int __init alloc_workspace(void) 31{ 32 lzo_mem = vmalloc(LZO1X_MEM_COMPRESS); 33 lzo_compress_buf = vmalloc(lzo1x_worst_compress(PAGE_SIZE)); 34 35 if (!lzo_mem || !lzo_compress_buf) { |
36 printk(KERN_WARNING "Failed to allocate lzo deflate workspace\n"); | |
37 free_workspace(); 38 return -ENOMEM; 39 } 40 41 return 0; 42} 43 44static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, --- 67 unchanged lines hidden --- | 36 free_workspace(); 37 return -ENOMEM; 38 } 39 40 return 0; 41} 42 43static int jffs2_lzo_compress(unsigned char *data_in, unsigned char *cpage_out, --- 67 unchanged lines hidden --- |