summaryrefslogtreecommitdiff
path: root/fs/btrfs/raid56.c
diff options
context:
space:
mode:
authorFabio M. De Francesco <fmdefrancesco@gmail.com>2022-06-27 18:33:05 +0200
committerDavid Sterba <dsterba@suse.com>2022-07-25 17:45:40 +0200
commit718e58551aecf7a63aa643ec0668a0374eee9de0 (patch)
tree65f8a7c110f65b0c31675328cab7e3c7f6556f27 /fs/btrfs/raid56.c
parentebd23482efa3d077a9461af29a093bdce3d3a2b8 (diff)
downloadlinux-718e58551aecf7a63aa643ec0668a0374eee9de0.tar.gz
linux-718e58551aecf7a63aa643ec0668a0374eee9de0.tar.bz2
linux-718e58551aecf7a63aa643ec0668a0374eee9de0.zip
btrfs: zlib: replace kmap() with kmap_local_page() in zlib_compress_pages()
The use of kmap() is being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore, use kmap_local_page() / kunmap_local() in zlib_compress_pages() because in this function the mappings are per thread and are not visible in other contexts. Furthermore, drop the mappings of "out_page" which is allocated within zlib_compress_pages() with alloc_page(GFP_NOFS) and use page_address(). Tested with xfstests on a QEMU + KVM 32-bits VM with 4GB of RAM booting a kernel with HIGHMEM64G enabled. This patch passes 26/26 tests of group "compress". CC: Qu Wenruo <wqu@suse.com> Suggested-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.c')
0 files changed, 0 insertions, 0 deletions