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>
This commit is contained in:
parent
bbaf9715f3
commit
4c2bf276b5
@ -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,
|
||||
|
@ -286,9 +286,8 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans,
|
||||
cur_size = min_t(unsigned long, compressed_size,
|
||||
PAGE_SIZE);
|
||||
|
||||
kaddr = kmap_atomic(cpage);
|
||||
kaddr = page_address(cpage);
|
||||
write_extent_buffer(leaf, kaddr, ptr, cur_size);
|
||||
kunmap_atomic(kaddr);
|
||||
|
||||
i++;
|
||||
ptr += cur_size;
|
||||
|
Loading…
Reference in New Issue
Block a user