IO-Uring Archive on lore.kernel.org
 help / color / 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 <asml.silence@gmail.com>
---

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	[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, back to index

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

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git