--- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -204,6 +204,7 @@ static void p9_conn_cancel(struct p9_con list_move(&req->req_list, &cancel_list); } list_for_each_entry_safe(req, rtmp, &m->unsent_req_list, req_list) { + req->status = REQ_STATUS_ERROR; list_move(&req->req_list, &cancel_list); } @@ -705,6 +706,8 @@ static int p9_fd_cancel(struct p9_client p9_req_put(client, req); ret = 0; } + else if (req->status == REQ_STATUS_ERROR) + ret = 0; spin_unlock(&m->req_lock); return ret;