]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/btrfs/lzo.c
btrfs: add dummy callback for readpage_io_failed and drop checks
[mirror_ubuntu-artful-kernel.git] / fs / btrfs / lzo.c
index 45d26980caf97db422e2bfb80da4f165ea7c8623..f48c8c14dc144b63a5e4d1d8c355106649614bba 100644 (file)
@@ -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;