diff mbox series

[1/4] btrfs: zlib: use copy_page for full page copy

Message ID 5f5b4513ded109bd87c5aa5105608fa8363d72d2.1667244568.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Minor cleanups | expand

Commit Message

David Sterba Oct. 31, 2022, 7:33 p.m. UTC
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.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/zlib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Anand Jain Oct. 31, 2022, 11:49 p.m. UTC | #1
On 01/11/2022 03:33, David Sterba wrote:
> 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.
> 
> Signed-off-by: David Sterba <dsterba@suse.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>
diff mbox series

Patch

diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index b4f44662cda7..c5275cb23837 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -155,8 +155,8 @@  int zlib_compress_pages(struct list_head *ws, struct address_space *mapping,
 					in_page = find_get_page(mapping,
 								start >> PAGE_SHIFT);
 					data_in = kmap_local_page(in_page);
-					memcpy(workspace->buf + i * PAGE_SIZE,
-					       data_in, PAGE_SIZE);
+					copy_page(workspace->buf + i * PAGE_SIZE,
+						  data_in);
 					start += PAGE_SIZE;
 				}
 				workspace->strm.next_in = workspace->buf;