]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_aio_throttle.cc
import ceph 14.2.5
[ceph.git] / ceph / src / rgw / rgw_aio_throttle.cc
index 1ac1be259d3ee1c455442407b87671ca9e292efa..79d095d20f456c4865b58a6ecd363ea7df7b1db2 100644 (file)
@@ -48,6 +48,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj,
 
   if (cost > window) {
     p->result = -EDEADLK; // would never succeed
+    std::unique_lock lock{mutex};
     completed.push_back(*p);
   } else {
     get(*p);
@@ -57,6 +58,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj,
     }
   }
   p.release();
+  std::unique_lock lock{mutex};
   return std::move(completed);
 }
 
@@ -71,6 +73,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj,
 
   if (cost > window) {
     p->result = -EDEADLK; // would never succeed
+    std::unique_lock lock{mutex};
     completed.push_back(*p);
   } else {
     get(*p);
@@ -80,6 +83,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj,
     }
   }
   p.release();
+  std::unique_lock lock{mutex};
   return std::move(completed);
 }