splice: always updated atime in direct splice
authorJens Axboe <jens.axboe@oracle.com>
Wed, 30 Jan 2008 11:24:48 +0000 (12:24 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 1 Feb 2008 08:26:32 +0000 (09:26 +0100)
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>
fs/splice.c

index 1577a7391d23fa47cd74fb5089278dba81daee55..4ee49e86edde5a2272781b6e49e0371b721ceb33 100644 (file)
@@ -1033,9 +1033,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
 
 done:
        pipe->nrbufs = pipe->curbuf = 0;
-       if (bytes > 0)
-               file_accessed(in);
-
+       file_accessed(in);
        return bytes;
 
 out_release: