diff options
author | David Sterba <dsterba@suse.com> | 2018-06-29 10:56:44 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:12:43 +0200 |
commit | 69d2480456d1baf027a86e530989d7bedd698d5f (patch) | |
tree | d8ea7d3361136fb4620ce85ce2ea64ae6454c55a /fs/btrfs/free-space-cache.c | |
parent | btrfs: simplify pointer chasing of local fs_info variables (diff) | |
download | linux-69d2480456d1baf027a86e530989d7bedd698d5f.tar.xz linux-69d2480456d1baf027a86e530989d7bedd698d5f.zip |
btrfs: use copy_page for copying pages instead of memcpy
Use the helper that's possibly optimized for full page copies.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r-- | fs/btrfs/free-space-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 354d55f22d99..57e7ab7f5e03 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -547,7 +547,7 @@ static int io_ctl_add_bitmap(struct btrfs_io_ctl *io_ctl, void *bitmap) io_ctl_map_page(io_ctl, 0); } - memcpy(io_ctl->cur, bitmap, PAGE_SIZE); + copy_page(io_ctl->cur, bitmap); io_ctl_set_crc(io_ctl, io_ctl->index - 1); if (io_ctl->index < io_ctl->num_pages) io_ctl_map_page(io_ctl, 0); @@ -607,7 +607,7 @@ static int io_ctl_read_bitmap(struct btrfs_io_ctl *io_ctl, if (ret) return ret; - memcpy(entry->bitmap, io_ctl->cur, PAGE_SIZE); + copy_page(entry->bitmap, io_ctl->cur); io_ctl_unmap_page(io_ctl); return 0; |