summaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-01-05 12:22:26 +0100
committerJens Axboe <axboe@kernel.dk>2023-01-29 23:17:40 +0100
commit490c00eb4fa5e5e25e0127240f6d6c1b499da95b (patch)
tree62b4b4dd9dbc881c2566d96c591e3df7bb984b3c /io_uring
parentio_uring: mimimise io_cqring_wait_schedule (diff)
downloadlinux-490c00eb4fa5e5e25e0127240f6d6c1b499da95b.tar.xz
linux-490c00eb4fa5e5e25e0127240f6d6c1b499da95b.zip
io_uring: simplify io_has_work
->work_llist should never be non-empty for a non DEFER_TASKRUN ring, so we can safely skip checking the flag. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/26af9f73c09a56c9a035f94db56127358688f3aa.1672916894.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 2cbf33996c3b..4cb9cce23c90 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2419,8 +2419,7 @@ struct io_wait_queue {
static inline bool io_has_work(struct io_ring_ctx *ctx)
{
return test_bit(IO_CHECK_CQ_OVERFLOW_BIT, &ctx->check_cq) ||
- ((ctx->flags & IORING_SETUP_DEFER_TASKRUN) &&
- !llist_empty(&ctx->work_llist));
+ !llist_empty(&ctx->work_llist);
}
static inline bool io_should_wake(struct io_wait_queue *iowq)