diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c index 718bd0056384..29e394e49ddd 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/security.h> | 31 | #include <linux/security.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/socket.h> | 33 | #include <linux/socket.h> |
34 | #include "internal.h" | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * Attempt to steal a page from a pipe buffer. This should perhaps go into | 37 | * Attempt to steal a page from a pipe buffer. This should perhaps go into |
@@ -1048,9 +1049,10 @@ static int write_pipe_buf(struct pipe_inode_info *pipe, struct pipe_buffer *buf, | |||
1048 | { | 1049 | { |
1049 | int ret; | 1050 | int ret; |
1050 | void *data; | 1051 | void *data; |
1052 | loff_t tmp = sd->pos; | ||
1051 | 1053 | ||
1052 | data = buf->ops->map(pipe, buf, 0); | 1054 | data = buf->ops->map(pipe, buf, 0); |
1053 | ret = kernel_write(sd->u.file, data + buf->offset, sd->len, sd->pos); | 1055 | ret = __kernel_write(sd->u.file, data + buf->offset, sd->len, &tmp); |
1054 | buf->ops->unmap(pipe, buf, data); | 1056 | buf->ops->unmap(pipe, buf, data); |
1055 | 1057 | ||
1056 | return ret; | 1058 | return ret; |