aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-01-30 06:24:48 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-02-01 03:26:32 -0500
commit8084870854fe181996c4aa4f44cb2fabcebf164c (patch)
tree6958333e62e8000f52ba6d6d9a559faa1248d3c5
parent13f09b95a82c46ed608d057b22e0dd18ebfff22a (diff)
splice: always updated atime in direct splice
Andre Majorel <aym-xunil@teaser.fr> points out that if we only updated the atime when we transfer some data, we deviate from the standard of always updating the atime. So change splice to always call file_accessed() even if splice_direct_to_actor() didn't transfer any data. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fs/splice.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 1577a7391d23..4ee49e86edde 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1033,9 +1033,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
1033 1033
1034done: 1034done:
1035 pipe->nrbufs = pipe->curbuf = 0; 1035 pipe->nrbufs = pipe->curbuf = 0;
1036 if (bytes > 0) 1036 file_accessed(in);
1037 file_accessed(in);
1038
1039 return bytes; 1037 return bytes;
1040 1038
1041out_release: 1039out_release: