diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2018-07-17 12:00:35 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-26 10:13:12 -0400 |
commit | 9635453572028134b0f997afca8a6ad9ece2c515 (patch) | |
tree | ff438e94c56cc36a85b93c676ee0a4c3de3cb6ae /fs/fuse | |
parent | d6d931adce1193ef54d06fa9bbf58e5780ca516c (diff) |
fuse: reduce allocation size for splice_write
The 'bufs' array contains 'pipe->buffers' elements, but the
fuse_dev_splice_write() uses only 'pipe->nrbufs' elements.
So reduce the allocation size to 'pipe->nrbufs' elements.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 1050c1cc22fe..11ea2c4a38ab 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -1957,7 +1957,7 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, | |||
1957 | 1957 | ||
1958 | pipe_lock(pipe); | 1958 | pipe_lock(pipe); |
1959 | 1959 | ||
1960 | bufs = kvmalloc_array(pipe->buffers, sizeof(struct pipe_buffer), | 1960 | bufs = kvmalloc_array(pipe->nrbufs, sizeof(struct pipe_buffer), |
1961 | GFP_KERNEL); | 1961 | GFP_KERNEL); |
1962 | if (!bufs) { | 1962 | if (!bufs) { |
1963 | pipe_unlock(pipe); | 1963 | pipe_unlock(pipe); |