summaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2021-06-15 17:15:38 +0200
committerDavid Sterba <dsterba@suse.com>2021-08-23 13:19:00 +0200
commit4c2bf276b56d8d27ddbafcdf056ef3fc60ae50b0 (patch)
tree77f7fa73f0a992b6861a7a665467afa9149d422b /fs/btrfs/compression.c
parentbbaf9715f3f5b5ff0de71da91fcc34ee9c198ed8 (diff)
btrfs: compression: drop kmap/kunmap from generic helpers
The pages in compressed_pages are not from highmem anymore so we can drop the mapping for checksum calculation and inline extent. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 49fdec423092..aeda426b6121 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -172,10 +172,9 @@ static int check_compressed_csum(struct btrfs_inode *inode, struct bio *bio,
/* Hash through the page sector by sector */
for (pg_offset = 0; pg_offset < bytes_left;
pg_offset += sectorsize) {
- kaddr = kmap_atomic(page);
+ kaddr = page_address(page);
crypto_shash_digest(shash, kaddr + pg_offset,
sectorsize, csum);
- kunmap_atomic(kaddr);
if (memcmp(&csum, cb_sum, csum_size) != 0) {
btrfs_print_data_csum_error(inode, disk_start,