diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/splice.c b/fs/splice.c index 0a0b79b01d05..1577a7391d23 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1031,7 +1031,11 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, | |||
1031 | goto out_release; | 1031 | goto out_release; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | done: | ||
1034 | pipe->nrbufs = pipe->curbuf = 0; | 1035 | pipe->nrbufs = pipe->curbuf = 0; |
1036 | if (bytes > 0) | ||
1037 | file_accessed(in); | ||
1038 | |||
1035 | return bytes; | 1039 | return bytes; |
1036 | 1040 | ||
1037 | out_release: | 1041 | out_release: |
@@ -1047,16 +1051,11 @@ out_release: | |||
1047 | buf->ops = NULL; | 1051 | buf->ops = NULL; |
1048 | } | 1052 | } |
1049 | } | 1053 | } |
1050 | pipe->nrbufs = pipe->curbuf = 0; | ||
1051 | |||
1052 | /* | ||
1053 | * If we transferred some data, return the number of bytes: | ||
1054 | */ | ||
1055 | if (bytes > 0) | ||
1056 | return bytes; | ||
1057 | 1054 | ||
1058 | return ret; | 1055 | if (!bytes) |
1056 | bytes = ret; | ||
1059 | 1057 | ||
1058 | goto done; | ||
1060 | } | 1059 | } |
1061 | EXPORT_SYMBOL(splice_direct_to_actor); | 1060 | EXPORT_SYMBOL(splice_direct_to_actor); |
1062 | 1061 | ||