[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360833139-5850-1-git-send-email-kyungsik.lee@lge.com>
Date: Thu, 14 Feb 2013 18:12:19 +0900
From: Kyungsik Lee <kyungsik.lee@....com>
To: Chris Mason <chris.mason@...ionio.com>,
Li Zefan <lizf@...fujitsu.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: hyojun.im@....com, chan.jeong@....com, raphael.andy.lee@...il.com,
Kyungsik Lee <kyungsik.lee@....com>
Subject: [PATCH] btrfs: fix decompress buffer size
lzo1x_1_compress() is unnecessarily used for allocating decompress buffer.
Signed-off-by: Kyungsik Lee <kyungsik.lee@....com>
---
fs/btrfs/lzo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c
index 743b86f..223893a 100644
--- 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);
workspace->cbuf = vmalloc(lzo1x_worst_compress(PAGE_CACHE_SIZE));
if (!workspace->mem || !workspace->buf || !workspace->cbuf)
goto fail;
@@ -349,7 +349,7 @@ cont:
}
}
- out_len = lzo1x_worst_compress(PAGE_CACHE_SIZE);
+ out_len = PAGE_CACHE_SIZE;
ret = lzo1x_decompress_safe(buf, in_len, workspace->buf,
&out_len);
if (need_unmap)
--
1.8.0.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists