Commit 54739cc6 authored by Jens Axboe's avatar Jens Axboe

io_uring: make prep and issue side of req handlers named consistently

Almost all of them are, the odd ones out are the poll remove and the
files update request. Name them like the others, which is:

io_#cmdname_prep	for request preparation
io_#cmdname		for request issue
Reviewed-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ecddc25d
...@@ -7390,7 +7390,7 @@ static __poll_t io_poll_parse_events(const struct io_uring_sqe *sqe, ...@@ -7390,7 +7390,7 @@ static __poll_t io_poll_parse_events(const struct io_uring_sqe *sqe,
return demangle_poll(events) | (events & (EPOLLEXCLUSIVE|EPOLLONESHOT)); return demangle_poll(events) | (events & (EPOLLEXCLUSIVE|EPOLLONESHOT));
} }
static int io_poll_update_prep(struct io_kiocb *req, static int io_poll_remove_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
struct io_poll_update *upd = &req->poll_update; struct io_poll_update *upd = &req->poll_update;
...@@ -7454,7 +7454,7 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags) ...@@ -7454,7 +7454,7 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags)
return 0; return 0;
} }
static int io_poll_update(struct io_kiocb *req, unsigned int issue_flags) static int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)
{ {
struct io_cancel_data cd = { .data = req->poll_update.old_user_data, }; struct io_cancel_data cd = { .data = req->poll_update.old_user_data, };
struct io_ring_ctx *ctx = req->ctx; struct io_ring_ctx *ctx = req->ctx;
...@@ -7983,7 +7983,7 @@ static int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags) ...@@ -7983,7 +7983,7 @@ static int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)
return 0; return 0;
} }
static int io_rsrc_update_prep(struct io_kiocb *req, static int io_files_update_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT))) if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT)))
...@@ -8038,7 +8038,7 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) ...@@ -8038,7 +8038,7 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
case IORING_OP_POLL_ADD: case IORING_OP_POLL_ADD:
return io_poll_add_prep(req, sqe); return io_poll_add_prep(req, sqe);
case IORING_OP_POLL_REMOVE: case IORING_OP_POLL_REMOVE:
return io_poll_update_prep(req, sqe); return io_poll_remove_prep(req, sqe);
case IORING_OP_FSYNC: case IORING_OP_FSYNC:
return io_fsync_prep(req, sqe); return io_fsync_prep(req, sqe);
case IORING_OP_SYNC_FILE_RANGE: case IORING_OP_SYNC_FILE_RANGE:
...@@ -8068,7 +8068,7 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) ...@@ -8068,7 +8068,7 @@ static int io_req_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
case IORING_OP_CLOSE: case IORING_OP_CLOSE:
return io_close_prep(req, sqe); return io_close_prep(req, sqe);
case IORING_OP_FILES_UPDATE: case IORING_OP_FILES_UPDATE:
return io_rsrc_update_prep(req, sqe); return io_files_update_prep(req, sqe);
case IORING_OP_STATX: case IORING_OP_STATX:
return io_statx_prep(req, sqe); return io_statx_prep(req, sqe);
case IORING_OP_FADVISE: case IORING_OP_FADVISE:
...@@ -8334,7 +8334,7 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags) ...@@ -8334,7 +8334,7 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags)
ret = io_poll_add(req, issue_flags); ret = io_poll_add(req, issue_flags);
break; break;
case IORING_OP_POLL_REMOVE: case IORING_OP_POLL_REMOVE:
ret = io_poll_update(req, issue_flags); ret = io_poll_remove(req, issue_flags);
break; break;
case IORING_OP_SYNC_FILE_RANGE: case IORING_OP_SYNC_FILE_RANGE:
ret = io_sync_file_range(req, issue_flags); ret = io_sync_file_range(req, issue_flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment