mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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 <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
This commit is contained in:
1 parent
d6d931adce
commit
9635453572
1 file changed
+1
-1
+1
-1
@@ -1957,7 +1957,7 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe,
|
||||
|
||||
pipe_lock(pipe);
|
||||
|
||||
bufs = kvmalloc_array(pipe->buffers, sizeof(struct pipe_buffer),
|
||||
bufs = kvmalloc_array(pipe->nrbufs, sizeof(struct pipe_buffer),
|
||||
GFP_KERNEL);
|
||||
if (!bufs) {
|
||||
pipe_unlock(pipe);
|
||||
|
||||
Reference in new issue
Block a user