X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=io_uring%2Fio_uring.h;h=50bc3af449534ca8cf7b02957c09e3acb224541e;hb=644e9524388a5dbc6d4f58c492ee9ef7bd4ddf4d;hp=e99a79f2df9b18365559d6623133f77fdb60e3a6;hpb=8f2975c2bb4c6fd43d778db55481fc11806c8773;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index e99a79f..50bc3af 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -17,8 +17,8 @@ enum { IOU_ISSUE_SKIP_COMPLETE = -EIOCBQUEUED, /* - * Intended only when both REQ_F_POLLED and REQ_F_APOLL_MULTISHOT - * are set to indicate to the poll runner that multishot should be + * Intended only when both IO_URING_F_MULTISHOT is passed + * to indicate to the poll runner that multishot should be * removed and the result is set on req->cqe.res. */ IOU_STOP_MULTISHOT = -ECANCELED, @@ -238,9 +238,14 @@ static inline unsigned int io_sqring_entries(struct io_ring_ctx *ctx) static inline int io_run_task_work(void) { + /* + * Always check-and-clear the task_work notification signal. With how + * signaling works for task_work, we can find it set with nothing to + * run. We need to clear it for that case, like get_signal() does. + */ + if (test_thread_flag(TIF_NOTIFY_SIGNAL)) + clear_notify_signal(); if (task_work_pending(current)) { - if (test_thread_flag(TIF_NOTIFY_SIGNAL)) - clear_notify_signal(); __set_current_state(TASK_RUNNING); task_work_run(); return 1;