Skip to content

Commit

Permalink
use spl_vmem_zalloc
Browse files Browse the repository at this point in the history
spl_kmem_zalloc asserts if KM_VMEM is used. personally i think this
is a bug in the spl layer since spl_kmem_free can handle both types
of allocation.

Signed-off-by: Sebastian Gottschall <[email protected]>
  • Loading branch information
BrainSlayer committed Oct 28, 2018
1 parent 5185807 commit 93ce71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zstd/zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ zstd_alloc(void *opaque __unused, size_t size)
*/
#ifdef _KERNEL
if (nbytes > spl_kmem_alloc_max || nbytes > spl_kmem_alloc_warn)
z = kmem_zalloc(nbytes, KM_NOSLEEP | KM_VMEM);
z = vmem_zalloc(nbytes, KM_NOSLEEP);
else
#endif
z = kmem_zalloc(nbytes, KM_NOSLEEP);
Expand Down

0 comments on commit 93ce71a

Please sign in to comment.