• David Sterba's avatar
    btrfs: switch to kvmalloc and GFP_KERNEL in lzo/zlib alloc_workspace · 6acafd1e
    David Sterba authored
    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>
    6acafd1e
lzo.c 10.2 KB