]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: stop cr manager in destructor
authorYehuda Sadeh <yehuda@redhat.com>
Sun, 17 Apr 2016 00:27:35 +0000 (17:27 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Sun, 17 Apr 2016 23:05:31 +0000 (16:05 -0700)
callers don't need to call it explicitly

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_coroutine.h

index 09128576bb1a45b16a2ac10db289b4463e46b5b4..b27d3e74a4612f9610af01a443e01e15009b2678 100644 (file)
@@ -536,6 +536,7 @@ public:
     }
   }
   virtual ~RGWCoroutinesManager() {
+    stop();
     completion_mgr->put();
     if (cr_registry) {
       cr_registry->remove(this);
@@ -545,8 +546,9 @@ public:
   int run(list<RGWCoroutinesStack *>& ops);
   int run(RGWCoroutine *op);
   void stop() {
-    going_down.set(1);
-    completion_mgr->go_down();
+    if (going_down.inc() == 1) {
+      completion_mgr->go_down();
+    }
   }
 
   virtual void report_error(RGWCoroutinesStack *op);