public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v2] io_uring: fix missing wake_up io_rw_reissue()
@ 2020-06-29  9:59 Pavel Begunkov
  2020-06-29 13:43 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2020-06-29  9:59 UTC (permalink / raw)
  To: Jens Axboe, io-uring

Don't forget to wake up a process to which io_rw_reissue() added
task_work.

Signed-off-by: Pavel Begunkov <[email protected]>
---

v2: wake on success path not fail (Jens)

 fs/io_uring.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3bbadc3247b4..6710097564de 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2168,8 +2168,10 @@ static bool io_rw_reissue(struct io_kiocb *req, long res)
 	tsk = req->task;
 	init_task_work(&req->task_work, io_rw_resubmit);
 	ret = task_work_add(tsk, &req->task_work, true);
-	if (!ret)
+	if (!ret) {
+		wake_up_process(tsk);
 		return true;
+	}
 #endif
 	return false;
 }
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] io_uring: fix missing wake_up io_rw_reissue()
  2020-06-29  9:59 [PATCH v2] io_uring: fix missing wake_up io_rw_reissue() Pavel Begunkov
@ 2020-06-29 13:43 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-06-29 13:43 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring

On 6/29/20 3:59 AM, Pavel Begunkov wrote:
> Don't forget to wake up a process to which io_rw_reissue() added
> task_work.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-29 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29  9:59 [PATCH v2] io_uring: fix missing wake_up io_rw_reissue() Pavel Begunkov
2020-06-29 13:43 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox