Commit 9e5e6d4e authored by David Sterba's avatar David Sterba

btrfs: zlib: use copy_page for full page copy

The copy_page helper may use an optimized version for full page copy
(eg. on s390 there's a special instruction for that), there's one more
left to convert.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e2a04165
...@@ -155,8 +155,8 @@ int zlib_compress_pages(struct list_head *ws, struct address_space *mapping, ...@@ -155,8 +155,8 @@ int zlib_compress_pages(struct list_head *ws, struct address_space *mapping,
in_page = find_get_page(mapping, in_page = find_get_page(mapping,
start >> PAGE_SHIFT); start >> PAGE_SHIFT);
data_in = kmap_local_page(in_page); data_in = kmap_local_page(in_page);
memcpy(workspace->buf + i * PAGE_SIZE, copy_page(workspace->buf + i * PAGE_SIZE,
data_in, PAGE_SIZE); data_in);
start += PAGE_SIZE; start += PAGE_SIZE;
} }
workspace->strm.next_in = workspace->buf; workspace->strm.next_in = workspace->buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment