Commit a146468d authored by Jens Axboe's avatar Jens Axboe

io_uring: break links on shutdown failure

Ensure that the return value of __sys_shutdown_sock() is used to
potentially break links to the request, if we fail.

Fixes: 36f4fa68 ("io_uring: add support for shutdown(2)")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 009bd55d
......@@ -3784,6 +3784,8 @@ static int io_shutdown(struct io_kiocb *req, bool force_nonblock)
return -ENOTSOCK;
ret = __sys_shutdown_sock(sock, req->shutdown.how);
if (ret < 0)
req_set_fail_links(req);
io_req_complete(req, ret);
return 0;
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment