Skip to content

Commit

Permalink
Bug fix in qat_compress.c for vmalloc addr check
Browse files Browse the repository at this point in the history
Remove the unused vmalloc address check, and function mem_to_page
will handle the non-vmalloc address when map it to a physical
address.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Weigang Li <[email protected]>
Closes openzfs#7125
  • Loading branch information
wli5 authored and tonyhutter committed Mar 8, 2018
1 parent 6d8678e commit b41e728
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions module/zfs/qat_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ qat_compress(qat_compress_dir_t dir, char *src, int src_len,
Cpa32U dst_buffer_list_mem_size = sizeof (CpaBufferList) +
(num_dst_buf * sizeof (CpaFlatBuffer));

if (!is_vmalloc_addr(src) || !is_vmalloc_addr(src + src_len - 1) ||
!is_vmalloc_addr(dst) || !is_vmalloc_addr(dst + dst_len - 1))
return (-1);

if (PHYS_CONTIG_ALLOC(&in_pages,
num_src_buf * sizeof (struct page *)) != CPA_STATUS_SUCCESS)
goto fail;
Expand Down

0 comments on commit b41e728

Please sign in to comment.