]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/fs/aio.h
update sources to v12.1.0
[ceph.git] / ceph / src / os / fs / aio.h
index 35d99f2c94f5664c095a5e6171cadc00d2cefcfc..c4757158cc90aa076699a09fe2db627d0133eae5 100644 (file)
@@ -65,7 +65,14 @@ struct aio_queue_t {
 
   int init() {
     assert(ctx == 0);
-    return io_setup(max_iodepth, &ctx);
+    int r = io_setup(max_iodepth, &ctx);
+    if (r < 0) {
+      if (ctx) {
+       io_destroy(ctx);
+       ctx = 0;
+      }
+    }
+    return r;
   }
   void shutdown() {
     if (ctx) {