diff mbox series

[1/4] splice: don't call file_accessed in copy_splice_read

Message ID 20230614140341.521331-2-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/4] splice: don't call file_accessed in copy_splice_read | expand

Commit Message

Christoph Hellwig June 14, 2023, 2:03 p.m. UTC
copy_splice_read calls into ->read_iter to read the data, which already
calls file_accessed.

Fixes: 33b3b041543e ("splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/splice.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Johannes Thumshirn June 14, 2023, 6:03 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Christian Brauner June 16, 2023, 10:45 a.m. UTC | #2
On Wed, Jun 14, 2023 at 04:03:38PM +0200, Christoph Hellwig wrote:
> copy_splice_read calls into ->read_iter to read the data, which already
> calls file_accessed.
> 
> Fixes: 33b3b041543e ("splice: Add a func to do a splice from an O_DIRECT file without ITER_PIPE")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Looks good to me,
Reviewed-by: Christian Brauner <brauner@kernel.org>
diff mbox series

Patch

diff --git a/fs/splice.c b/fs/splice.c
index 2420ead610a727..87c69fdb333dab 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -368,7 +368,6 @@  ssize_t copy_splice_read(struct file *in, loff_t *ppos,
 	if (ret > 0) {
 		keep = DIV_ROUND_UP(ret, PAGE_SIZE);
 		*ppos = kiocb.ki_pos;
-		file_accessed(in);
 	} else if (ret < 0) {
 		/*
 		 * callers of ->splice_read() expect -EAGAIN on