lkml.org 
[lkml]   [2013]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] btrfs: fix decompress buffer size
On Thu, Feb 14, 2013 at 06:12:19PM +0900, Kyungsik Lee wrote:
> lzo1x_1_compress() is unnecessarily used for allocating decompress buffer.
>
> --- a/fs/btrfs/lzo.c
> +++ b/fs/btrfs/lzo.c
> @@ -55,7 +55,7 @@ static struct list_head *lzo_alloc_workspace(void)
> return ERR_PTR(-ENOMEM);
>
> workspace->mem = vmalloc(LZO1X_MEM_COMPRESS);
> - workspace->buf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
> + workspace->buf = vmalloc(PAGE_CACHE_SIZE);

Right, PAGE_CACHE_SIZE is enough in size, but then we don't even need
vmalloc.

david


\
 
 \ /
  Last update: 2013-02-14 13:21    [W:0.041 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site