io_uring: make io_sqpoll_wait_sq return void
JIRA: https://issues.redhat.com/browse/RHEL-12076 commit 88b80534f60f5ddf5f42218b280e0370f95eae78 Author: Quanfa Fu <quanfafu@gmail.com> Date: Sun Jan 15 15:15:19 2023 +0800 io_uring: make io_sqpoll_wait_sq return void Change the return type to void since it always return 0, and no need to do the checking in syscall io_uring_enter. Signed-off-by: Quanfa Fu <quanfafu@gmail.com> Link: https://lore.kernel.org/r/20230115071519.554282-1-quanfafu@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
This commit is contained in:
parent
f17ee539d7
commit
1a0d396ca5
|
@ -3469,11 +3469,9 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
|
||||||
}
|
}
|
||||||
if (flags & IORING_ENTER_SQ_WAKEUP)
|
if (flags & IORING_ENTER_SQ_WAKEUP)
|
||||||
wake_up(&ctx->sq_data->wait);
|
wake_up(&ctx->sq_data->wait);
|
||||||
if (flags & IORING_ENTER_SQ_WAIT) {
|
if (flags & IORING_ENTER_SQ_WAIT)
|
||||||
ret = io_sqpoll_wait_sq(ctx);
|
io_sqpoll_wait_sq(ctx);
|
||||||
if (ret)
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
ret = to_submit;
|
ret = to_submit;
|
||||||
} else if (to_submit) {
|
} else if (to_submit) {
|
||||||
ret = io_uring_add_tctx_node(ctx);
|
ret = io_uring_add_tctx_node(ctx);
|
||||||
|
|
|
@ -311,7 +311,7 @@ static int io_sq_thread(void *data)
|
||||||
do_exit(0);
|
do_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
|
void io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
|
|
||||||
|
@ -326,7 +326,6 @@ int io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
|
||||||
} while (!signal_pending(current));
|
} while (!signal_pending(current));
|
||||||
|
|
||||||
finish_wait(&ctx->sqo_sq_wait, &wait);
|
finish_wait(&ctx->sqo_sq_wait, &wait);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__cold int io_sq_offload_create(struct io_ring_ctx *ctx,
|
__cold int io_sq_offload_create(struct io_ring_ctx *ctx,
|
||||||
|
|
|
@ -26,4 +26,4 @@ void io_sq_thread_stop(struct io_sq_data *sqd);
|
||||||
void io_sq_thread_park(struct io_sq_data *sqd);
|
void io_sq_thread_park(struct io_sq_data *sqd);
|
||||||
void io_sq_thread_unpark(struct io_sq_data *sqd);
|
void io_sq_thread_unpark(struct io_sq_data *sqd);
|
||||||
void io_put_sq_data(struct io_sq_data *sqd);
|
void io_put_sq_data(struct io_sq_data *sqd);
|
||||||
int io_sqpoll_wait_sq(struct io_ring_ctx *ctx);
|
void io_sqpoll_wait_sq(struct io_ring_ctx *ctx);
|
||||||
|
|
Loading…
Reference in New Issue