From: Stefan Hajnoczi Date: Mon, 15 Apr 2013 14:14:46 +0000 (+0200) Subject: nbd: unlock mutex in nbd_co_send_request() error path X-Git-Tag: v1.4.2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0486c27a36f0f6448f1f91ee8de3d9fdc49bde23;p=thirdparty%2Fqemu.git nbd: unlock mutex in nbd_co_send_request() error path Cc: qemu-stable@nongnu.org Signed-off-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini (cherry picked from commit 6760c47aa42ce30efdd12c132f73c8749c575995) Signed-off-by: Michael Roth --- diff --git a/block/nbd.c b/block/nbd.c index 6562fd30843..d80c9a506ac 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -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,