From: Casey Bodley Date: Wed, 4 Jan 2017 16:36:00 +0000 (-0500) Subject: rgw: release RGWAioCompletionNotifier refs on destruction X-Git-Tag: v11.2.0~6^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3686cdb2c4214748448980abe1c1a2c019ca1db2;p=ceph.git rgw: release RGWAioCompletionNotifier refs on destruction Fixes: http://tracker.ceph.com/issues/18407 Fixes: http://tracker.ceph.com/issues/18414 Signed-off-by: Casey Bodley (cherry picked from commit 7a4975adba8b890e211d47662896e445a9822970) --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index 743399d5b51..d975a5d050e 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -43,7 +43,6 @@ void RGWCompletionManager::register_completion_notifier(RGWAioCompletionNotifier Mutex::Locker l(lock); if (cn) { cns.insert(cn); - cn->get(); } } @@ -52,7 +51,6 @@ void RGWCompletionManager::unregister_completion_notifier(RGWAioCompletionNotifi Mutex::Locker l(lock); if (cn) { cns.erase(cn); - cn->put(); } } @@ -60,7 +58,6 @@ void RGWCompletionManager::_complete(RGWAioCompletionNotifier *cn, void *user_in { if (cn) { cns.erase(cn); - cn->put(); } complete_reqs.push_back(user_info); cond.Signal(); diff --git a/src/rgw/rgw_coroutine.h b/src/rgw/rgw_coroutine.h index 208dfd627e0..124a2d3c60e 100644 --- a/src/rgw/rgw_coroutine.h +++ b/src/rgw/rgw_coroutine.h @@ -7,6 +7,7 @@ #endif #include +#include #ifdef NEED_ASSERT_H #pragma pop_macro("_ASSERT_H") @@ -30,7 +31,8 @@ class RGWAioCompletionNotifier; class RGWCompletionManager : public RefCountedObject { CephContext *cct; list complete_reqs; - set cns; + using NotifierRef = boost::intrusive_ptr; + set cns; Mutex lock; Cond cond;