aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/splice.c15
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
1034done:
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
1037out_release: 1041out_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}
1061EXPORT_SYMBOL(splice_direct_to_actor); 1060EXPORT_SYMBOL(splice_direct_to_actor);
1062 1061