aboutsummaryrefslogtreecommitdiff
path: root/block/raw-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r--block/raw-posix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c
index cce10a45a8..ffdb1763f8 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1087,6 +1087,11 @@ static void raw_close(BlockDriverState *bs)
raw_detach_aio_context(bs);
+#ifdef CONFIG_LINUX_AIO
+ if (s->use_aio) {
+ laio_cleanup(s->aio_ctx);
+ }
+#endif
if (s->fd >= 0) {
qemu_close(s->fd);
s->fd = -1;