26 #include <linux/slab.h>
59 ERROR(
"Failed to allocate lzo workspace\n");
65 static void lzo_free(
void *strm)
78 struct buffer_head **bh,
int b,
int offset,
int length,
int srclength,
82 void *buff = stream->
input;
88 for (i = 0; i <
b; i++) {
89 wait_on_buffer(bh[i]);
90 if (!buffer_uptodate(bh[i]))
94 memcpy(buff, bh[i]->b_data + offset, avail);
102 stream->
output, &out_len);
106 res = bytes = (
int)out_len;
107 for (i = 0, buff = stream->
output; bytes && i < pages; i++) {
109 memcpy(buffer[i], buff, avail);
124 ERROR(
"lzo decompression failed, data probably corrupt\n");
131 .decompress = lzo_uncompress,