Message ID | aa7b8101db24bc8639e3206439c2ff9d9dfba3e3.1629807222.git.asml.silence@gmail.com |
---|---|
State | New |
Headers | show |
Series | [5.10,backport] io_uring: only assign io_uring_enter() SQPOLL error in actual error case | expand |
diff --git a/fs/io_uring.c b/fs/io_uring.c index ed641dca7957..8492b4e7c4d7 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -9078,9 +9078,10 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit, if (ctx->flags & IORING_SETUP_SQPOLL) { io_cqring_overflow_flush(ctx, false, NULL, NULL); - ret = -EOWNERDEAD; - if (unlikely(ctx->sqo_dead)) + if (unlikely(ctx->sqo_dead)) { + ret = -EOWNERDEAD; goto out; + } if (flags & IORING_ENTER_SQ_WAKEUP) wake_up(&ctx->sq_data->wait); if (flags & IORING_ENTER_SQ_WAIT) {