aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-11-28 11:15:10 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-28 11:15:10 -0600
commit13bd0b5026265611809e99749bd74c2fd095247d (patch)
treefbc175b426cb2764b0c5362a72416d402cf95517 /block/sheepdog.c
parentf04303743ac59361795b4f0effc3c01bea9b65a3 (diff)
parent5bb1cbac4fdb1ca28f33c8d68538d03e3db7c160 (diff)
Merge remote-tracking branch 'kwolf/block-stable' into staging
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 9f8060960f..62f1f3a0cf 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1116,6 +1116,7 @@ static int coroutine_fn add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
/* send a header */
ret = do_write(s->fd, &hdr, sizeof(hdr));
if (ret) {
+ qemu_co_mutex_unlock(&s->lock);
error_report("failed to send a req, %s", strerror(errno));
return -EIO;
}
@@ -1123,6 +1124,7 @@ static int coroutine_fn add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
if (wlen) {
ret = do_writev(s->fd, iov, wlen, aio_req->iov_offset);
if (ret) {
+ qemu_co_mutex_unlock(&s->lock);
error_report("failed to send a data, %s", strerror(errno));
return -EIO;
}