]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
splice: don't call file_accessed in copy_splice_read
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jun 2023 14:03:38 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:23 +0000 (19:39 +0200)
[ 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 <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20230614140341.521331-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/splice.c

index 2c3dec2b6dfaf18477a0734bb08e6c0b79d5dcf2..5eca589fe84798656f5894536147b2272839cde3 100644 (file)
@@ -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