Merge tag 's390-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[linux-2.6-microblaze.git] / net / 9p / trans_fd.c
index 8f8f95e..e758978 100644 (file)
@@ -343,6 +343,7 @@ static void p9_read_work(struct work_struct *work)
                        p9_debug(P9_DEBUG_ERROR,
                                 "No recv fcall for tag %d (req %p), disconnecting!\n",
                                 m->rc.tag, m->rreq);
+                       p9_req_put(m->client, m->rreq);
                        m->rreq = NULL;
                        err = -EIO;
                        goto error;
@@ -378,7 +379,7 @@ static void p9_read_work(struct work_struct *work)
                m->rc.sdata = NULL;
                m->rc.offset = 0;
                m->rc.capacity = 0;
-               p9_req_put(m->rreq);
+               p9_req_put(m->client, m->rreq);
                m->rreq = NULL;
        }
 
@@ -492,7 +493,7 @@ static void p9_write_work(struct work_struct *work)
        m->wpos += err;
        if (m->wpos == m->wsize) {
                m->wpos = m->wsize = 0;
-               p9_req_put(m->wreq);
+               p9_req_put(m->client, m->wreq);
                m->wreq = NULL;
        }
 
@@ -695,7 +696,7 @@ static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req)
        if (req->status == REQ_STATUS_UNSENT) {
                list_del(&req->req_list);
                req->status = REQ_STATUS_FLSHD;
-               p9_req_put(req);
+               p9_req_put(client, req);
                ret = 0;
        }
        spin_unlock(&client->lock);
@@ -722,7 +723,7 @@ static int p9_fd_cancelled(struct p9_client *client, struct p9_req_t *req)
        list_del(&req->req_list);
        req->status = REQ_STATUS_FLSHD;
        spin_unlock(&client->lock);
-       p9_req_put(req);
+       p9_req_put(client, req);
 
        return 0;
 }
@@ -883,12 +884,12 @@ static void p9_conn_destroy(struct p9_conn *m)
        p9_mux_poll_stop(m);
        cancel_work_sync(&m->rq);
        if (m->rreq) {
-               p9_req_put(m->rreq);
+               p9_req_put(m->client, m->rreq);
                m->rreq = NULL;
        }
        cancel_work_sync(&m->wq);
        if (m->wreq) {
-               p9_req_put(m->wreq);
+               p9_req_put(m->client, m->wreq);
                m->wreq = NULL;
        }