summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2019-11-25 23:14:40 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-26 15:02:56 -0700
commit7d009165550adc64e3561c65ecce564125052e00 (patch)
tree8e401364eeb08fb5219aefa4950155cd0d31b115 /fs/io_uring.c
parentcf6fd4bd559ee61a4454b161863c8de6f30f8dca (diff)
downloadlinux-7d009165550adc64e3561c65ecce564125052e00.tar.bz2
io_uring: cleanup io_import_fixed()
Clean io_import_fixed() call site and make it return proper type. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index c846605b8361..e44b0e01f1b5 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1490,9 +1490,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;
@@ -1581,11 +1581,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)