Commit 3f614e44 authored by Andrey Vagin's avatar Andrey Vagin Committed by Cyrill Gorcunov

restore: fix length of spliced data

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 229defc9
......@@ -778,7 +778,7 @@ static int restore_pipe_data(struct pipe_entry *e, int wfd, int pipes_fd)
pr_info("\t%x: Splicing data to %d\n", e->pipeid, wfd);
while (size != e->bytes) {
ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes, 0);
ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes - size, 0);
if (ret < 0) {
pr_perror("\t%x: Error splicing data", e->pipeid);
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment