diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2018-07-17 19:00:34 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-26 17:13:12 +0300 |
commit | d6d931adce1193ef54d06fa9bbf58e5780ca516c (patch) | |
tree | cc055c3dc51301c32c998a5863dddfe25bd17938 /sound/sh | |
parent | a64ba10f65bfe2bead4693ef7fda9f7978dfa162 (diff) | |
download | linux-d6d931adce1193ef54d06fa9bbf58e5780ca516c.tar.xz |
fuse: use kvmalloc to allocate array of pipe_buffer structs.
The amount of pipe->buffers is basically controlled by userspace by
fcntl(... F_SETPIPE_SZ ...) so it could be large. High order allocations
could be slow (if memory is heavily fragmented) or may fail if the order
is larger than PAGE_ALLOC_COSTLY_ORDER.
Since the 'bufs' doesn't need to be physically contiguous, use
the kvmalloc_array() to allocate memory. If high order
page isn't available, the kvamalloc*() will fallback to 0-order.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'sound/sh')
0 files changed, 0 insertions, 0 deletions