]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
nbd: unlock mutex in nbd_co_send_request() error path
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 15 Apr 2013 14:14:46 +0000 (16:14 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 13 May 2013 16:47:07 +0000 (11:47 -0500)
Cc: qemu-stable@nongnu.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 6760c47aa42ce30efdd12c132f73c8749c575995)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/nbd.c

index 6562fd30843ea2a0f5c737ace660b94f04ceecb5..d80c9a506ac15f8b9738b70e60fa31454e75a2f0 100644 (file)
@@ -274,7 +274,7 @@ static int nbd_co_send_request(BDRVNBDState *s, struct nbd_request *request,
         ret = qemu_co_sendv(s->sock, qiov->iov, qiov->niov,
                             offset, request->len);
         if (ret != request->len) {
-            return -EIO;
+            rc = -EIO;
         }
     }
     qemu_aio_set_fd_handler(s->sock, nbd_reply_ready, NULL,