splice: always updated atime in direct splice

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, February 1, 2008 - 4:03 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=808487...
Commit:     8084870854fe181996c4aa4f44cb2fabcebf164c
Parent:     13f09b95a82c46ed608d057b22e0dd18ebfff22a
Author:     Jens Axboe <jens.axboe@oracle.com>
AuthorDate: Wed Jan 30 12:24:48 2008 +0100
Committer:  Jens Axboe <jens.axboe@oracle.com>
CommitDate: Fri Feb 1 09:26:32 2008 +0100

    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>
---
 fs/splice.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/splice.c b/fs/splice.c
index 1577a73..4ee49e8 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,
 
 done:
 	pipe->nrbufs = pipe->curbuf = 0;
-	if (bytes > 0)
-		file_accessed(in);
-
+	file_accessed(in);
 	return bytes;
 
 out_release:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
splice: always updated atime in direct splice, Linux Kernel Mailing ..., (Fri Feb 1, 4:03 am)