diff options
author | Chris Mason | 2017-02-28 14:35:09 -0800 |
---|---|---|
committer | Chris Mason | 2017-02-28 14:35:09 -0800 |
commit | e9f467d028cd7d8bee2a4d6c4fb806caf8cd580b (patch) | |
tree | e0a2b8e21ed58952c13e6d1dc3646eecd1ea211e /fs/btrfs/lzo.c | |
parent | ef6ebf324216eaea95ff30da5a8e78e2a4311eba (diff) | |
parent | 20a7db8ab3f2057a518448b1728d504ffadef65e (diff) |
Merge branch 'for-chris-4.11-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.11
Diffstat (limited to 'fs/btrfs/lzo.c')
-rw-r--r-- | fs/btrfs/lzo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index 45d26980caf9..f48c8c14dc14 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c @@ -76,7 +76,7 @@ static inline void write_compress_length(char *buf, size_t len) memcpy(buf, &dlen, LZO_LEN); } -static inline size_t read_compress_length(char *buf) +static inline size_t read_compress_length(const char *buf) { __le32 dlen; @@ -86,13 +86,11 @@ static inline size_t read_compress_length(char *buf) static int lzo_compress_pages(struct list_head *ws, struct address_space *mapping, - u64 start, unsigned long len, + u64 start, struct page **pages, - unsigned long nr_dest_pages, unsigned long *out_pages, unsigned long *total_in, - unsigned long *total_out, - unsigned long max_out) + unsigned long *total_out) { struct workspace *workspace = list_entry(ws, struct workspace, list); int ret = 0; @@ -102,7 +100,9 @@ static int lzo_compress_pages(struct list_head *ws, struct page *in_page = NULL; struct page *out_page = NULL; unsigned long bytes_left; - + unsigned long len = *total_out; + unsigned long nr_dest_pages = *out_pages; + const unsigned long max_out = nr_dest_pages * PAGE_SIZE; size_t in_len; size_t out_len; char *buf; |