Patchwork [01/15] nbd: unlock mutex in nbd_co_send_request() error path

login
register
mail settings
Submitter Michael Roth
Date May 14, 2013, 9:52 p.m.
Message ID <1368568392-2127-2-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/243836/
State New
Headers show

Comments

Michael Roth - May 14, 2013, 9:52 p.m.
From: Stefan Hajnoczi <stefanha@redhat.com>

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/block/nbd.c b/block/nbd.c
index 6562fd3..d80c9a5 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,