From c210e1af33376e52076338cfaeec55ab9b23cdd1 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 14 Jun 2023 16:03:38 +0200 Subject: [PATCH] splice: don't call file_accessed in copy_splice_read [ Upstream commit 0b24be4691c9e6ea13ca70050d42a9f9032fa788 ] 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 Reviewed-by: Johannes Thumshirn Reviewed-by: Christian Brauner Reviewed-by: David Howells Link: https://lore.kernel.org/r/20230614140341.521331-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/splice.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index 2c3dec2b6dfaf..5eca589fe8479 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -338,7 +338,6 @@ ssize_t direct_splice_read(struct file *in, loff_t *ppos, reclaim -= ret; remain = ret; *ppos = kiocb.ki_pos; - file_accessed(in); } else if (ret < 0) { /* * callers of ->splice_read() expect -EAGAIN on -- 2.47.2