Commit c3270e577c18b3d0e984c3371493205a4807db9d

Authored by Tom Zanussi
Committed by Jens Axboe
1 parent a01e035ebb

relay: fix splice problem

Splice isn't always incrementing the ppos correctly, which broke
relay splice.

Signed-off-by: Tom Zanussi <zanussi@comcast.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -1075,7 +1075,7 @@
1075 1075  
1076 1076 ret = splice_direct_to_actor(in, &sd, direct_splice_actor);
1077 1077 if (ret > 0)
1078   - *ppos += ret;
  1078 + *ppos = sd.pos;
1079 1079  
1080 1080 return ret;
1081 1081 }
... ... @@ -1162,7 +1162,7 @@
1162 1162 ret = 0;
1163 1163 spliced = 0;
1164 1164  
1165   - while (len) {
  1165 + while (len && !spliced) {
1166 1166 ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret);
1167 1167 if (ret < 0)
1168 1168 break;