From: Kemeng Shi <shikemeng@huaweicloud.com>
To: viro@zeniv.linux.org.uk, brauner@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] vfs: use helpers for calling f_op->{read,write}_iter() in read_write.c
Date: Mon, 28 Aug 2023 23:50:56 +0800 [thread overview]
Message-ID: <20230828155056.4100924-1-shikemeng@huaweicloud.com> (raw)
use helpers for calling f_op->{read,write}_iter() in read_write.c
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/read_write.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index a21ba3be7dbe..2f816f1212f4 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -425,7 +425,7 @@ ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
init_sync_kiocb(&kiocb, file);
kiocb.ki_pos = pos ? *pos : 0;
iov_iter_kvec(&iter, ITER_DEST, &iov, 1, iov.iov_len);
- ret = file->f_op->read_iter(&kiocb, &iter);
+ ret = call_read_iter(file, &kiocb, &iter);
if (ret > 0) {
if (pos)
*pos = kiocb.ki_pos;
@@ -514,7 +514,7 @@ ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *po
init_sync_kiocb(&kiocb, file);
kiocb.ki_pos = pos ? *pos : 0;
- ret = file->f_op->write_iter(&kiocb, from);
+ ret = call_write_iter(file, &kiocb, from);
if (ret > 0) {
if (pos)
*pos = kiocb.ki_pos;
--
2.30.0
next reply other threads:[~2023-08-28 7:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 15:50 Kemeng Shi [this message]
2023-08-28 12:00 ` [PATCH] vfs: use helpers for calling f_op->{read,write}_iter() in read_write.c Christoph Hellwig
2023-08-28 12:17 ` Kemeng Shi
2023-08-28 12:43 ` Matthew Wilcox
2023-08-28 12:19 ` Matthew Wilcox
2023-08-28 12:30 ` Christian Brauner
2023-08-28 14:09 ` Al Viro
2023-08-28 14:25 ` David Laight
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=20230828155056.4100924-1-shikemeng@huaweicloud.com \
--to=shikemeng@huaweicloud.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).