aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 6c9828651e6f..53fc2082a468 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1061,8 +1061,9 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
1061 1061
1062 while (len) { 1062 while (len) {
1063 size_t read_len; 1063 size_t read_len;
1064 loff_t pos = sd->pos;
1064 1065
1065 ret = do_splice_to(in, &sd->pos, pipe, len, flags); 1066 ret = do_splice_to(in, &pos, pipe, len, flags);
1066 if (unlikely(ret <= 0)) 1067 if (unlikely(ret <= 0))
1067 goto out_release; 1068 goto out_release;
1068 1069
@@ -1080,6 +1081,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
1080 1081
1081 bytes += ret; 1082 bytes += ret;
1082 len -= ret; 1083 len -= ret;
1084 sd->pos = pos;
1083 1085
1084 if (ret < read_len) 1086 if (ret < read_len)
1085 goto out_release; 1087 goto out_release;