diff --git a/fs/io_uring.c b/fs/io_uring.c index d90547794b71ac6b8d35a363c6e407d47ed7382a..5320de140b904b4c5b4f618459ab9c1055f65ece 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2960,6 +2960,8 @@ static void io_queue_sqe(struct io_kiocb *req) if (ret) { if (ret != -EIOCBQUEUED) { io_cqring_add_event(req, ret); + if (req->flags & REQ_F_LINK) + req->flags |= REQ_F_FAIL_LINK; io_double_put_req(req); } } else @@ -2992,6 +2994,8 @@ static void io_queue_link_head(struct io_kiocb *req, struct io_kiocb *shadow) if (ret != -EIOCBQUEUED) { err: io_cqring_add_event(req, ret); + if (req->flags & REQ_F_LINK) + req->flags |= REQ_F_FAIL_LINK; io_double_put_req(req); if (shadow) __io_free_req(shadow);