diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 196060dc6138..dab7f02dc243 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -687,7 +687,13 @@ static int p9_fd_request(struct p9_client *client, struct p9_req_t *req) else n = p9_fd_poll(m->client, NULL, NULL); - if (n & EPOLLOUT && !test_and_set_bit(Wworksched, &m->wsched)) + /* Failed to send request */ + if (!(n & EPOLLOUT)) { + p9_conn_cancel(m, -EIO); + return 0; + } + + if (!test_and_set_bit(Wworksched, &m->wsched)) schedule_work(&m->wq); return 0;