Skip to content
Commit 6acafd1e authored by David Sterba's avatar David Sterba
Browse files

btrfs: switch to kvmalloc and GFP_KERNEL in lzo/zlib alloc_workspace



The compression workspace buffers are larger than a page so we use
vmalloc, unconditionally. This is not always necessary as there might be
contiguous memory available.

Let's use the kvmalloc helpers that will try kmalloc first and fallback
to vmalloc. For that they require GFP_KERNEL flags. As we now have the
alloc_workspace calls protected by memalloc_nofs in the critical
contexts, we can safely use GFP_KERNEL.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 389a6cfc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment