linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/4] splice: don't call file_accessed in copy_splice_read
Date: Wed, 14 Jun 2023 16:03:38 +0200	[thread overview]
Message-ID: <20230614140341.521331-2-hch@lst.de> (raw)
In-Reply-To: <20230614140341.521331-1-hch@lst.de>

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(-)

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
-- 
2.39.2


  reply	other threads:[~2023-06-14 14:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 14:03 dio / splice fixups Christoph Hellwig
2023-06-14 14:03 ` Christoph Hellwig [this message]
2023-06-14 18:03   ` [PATCH 1/4] splice: don't call file_accessed in copy_splice_read Johannes Thumshirn
2023-06-16 10:45   ` Christian Brauner
2023-06-14 14:03 ` [PATCH 2/4] splice: simplify a conditional " Christoph Hellwig
2023-06-14 18:01   ` Johannes Thumshirn
2023-06-16 10:46   ` Christian Brauner
2023-06-14 14:03 ` [PATCH 3/4] block: remove BIO_PAGE_REFFED Christoph Hellwig
2023-06-14 18:03   ` Johannes Thumshirn
2023-06-16 10:47   ` Christian Brauner
2023-06-14 14:03 ` [PATCH 4/4] iov_iter: remove iov_iter_get_pages and iov_iter_get_pages_alloc Christoph Hellwig
2023-06-16 10:48   ` Christian Brauner
2023-06-16  9:44 ` [PATCH 2/4] splice: simplify a conditional in copy_splice_read David Howells
2023-06-16  9:46 ` dio / splice fixups David Howells
2023-06-16 16:08 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230614140341.521331-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).