From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 3/3] io_uring: cleanup io_import_fixed()
Date: Mon, 25 Nov 2019 23:14:40 +0300 [thread overview]
Message-ID: <3bea434add1c68d10fdc7b716c6e43099fabb5ab.1574712375.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Clean io_import_fixed() call site and make it return proper type.
Signed-off-by: Pavel Begunkov <[email protected]>
---
fs/io_uring.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index c75431079a74..7079e774bb8b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1488,9 +1488,9 @@ static void kiocb_done(struct kiocb *kiocb, ssize_t ret, struct io_kiocb **nxt,
io_rw_done(kiocb, ret);
}
-static int io_import_fixed(struct io_ring_ctx *ctx, int rw,
- const struct io_uring_sqe *sqe,
- struct iov_iter *iter)
+static ssize_t io_import_fixed(struct io_ring_ctx *ctx, int rw,
+ const struct io_uring_sqe *sqe,
+ struct iov_iter *iter)
{
size_t len = READ_ONCE(sqe->len);
struct io_mapped_ubuf *imu;
@@ -1579,11 +1579,9 @@ static ssize_t io_import_iovec(int rw, struct io_kiocb *req,
* flag.
*/
opcode = READ_ONCE(sqe->opcode);
- if (opcode == IORING_OP_READ_FIXED ||
- opcode == IORING_OP_WRITE_FIXED) {
- ssize_t ret = io_import_fixed(req->ctx, rw, sqe, iter);
+ if (opcode == IORING_OP_READ_FIXED || opcode == IORING_OP_WRITE_FIXED) {
*iovec = NULL;
- return ret;
+ return io_import_fixed(req->ctx, rw, sqe, iter);
}
if (!req->has_user)
--
2.24.0
next prev parent reply other threads:[~2019-11-25 20:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-25 20:14 [PATCHSET 0/3] io_uring minor cleanup Pavel Begunkov
2019-11-25 20:14 ` [PATCH 1/3] io_uring: store timeout's sqe->off in proper place Pavel Begunkov
2019-11-25 20:14 ` [PATCH 2/3] io_uring: inline struct sqe_submit Pavel Begunkov
2019-11-25 20:14 ` Pavel Begunkov [this message]
2019-11-26 4:49 ` [PATCHSET 0/3] io_uring minor cleanup 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=3bea434add1c68d10fdc7b716c6e43099fabb5ab.1574712375.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/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