diff mbox series

[v3] io_uring: Fix reversed nonblock flag

Message ID 9752f33f509287c77801d5e807213cff9195197a.1570197234.git.asml.silence@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v3] io_uring: Fix reversed nonblock flag | expand

Commit Message

Pavel Begunkov Oct. 4, 2019, 2:01 p.m. UTC
From: Pavel Begunkov <asml.silence@gmail.com>

io_queue_link_head() accepts @force_nonblock flag, but io_ring_submit()
passes something opposite.

v2: build error from test robot: Rebase to block-tree
v3: simplify with Jens suggestion

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe Oct. 4, 2019, 2:04 p.m. UTC | #1
On 10/4/19 8:01 AM, Pavel Begunkov (Silence) wrote:
> From: Pavel Begunkov <asml.silence@gmail.com>
> 
> io_queue_link_head() accepts @force_nonblock flag, but io_ring_submit()
> passes something opposite.
> 
> v2: build error from test robot: Rebase to block-tree
> v3: simplify with Jens suggestion

Thanks, looks good to me. Two minor notes that I fixed up:

1) The revision history should go below the --- line
2) I've added a Fixes tag
diff mbox series

Patch

diff --git a/fs/io_uring.c b/fs/io_uring.c
index c934f91c51e9..b58c3d8594d8 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2761,7 +2761,7 @@  static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit,
 
 	if (link)
 		io_queue_link_head(ctx, link, &link->submit, shadow_req,
-					block_for_last);
+					!block_for_last);
 	if (statep)
 		io_submit_state_end(statep);