From: chunmei Date: Tue, 30 May 2023 08:36:31 +0000 (+0000) Subject: crimson: use atomic counter for RefCountedObject as with classic X-Git-Tag: v19.0.0~993^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ee726d7821fc66dc0554305838831cc13d320f9;p=ceph.git crimson: use atomic counter for RefCountedObject as with classic crimson-osd uses RefCountedObject instances for objects that move between reactors, so we really do need to use an atomic counter. Fixes: https://tracker.ceph.com/issues/61502 Signed-off-by: chunmei --- diff --git a/src/common/RefCountedObj.h b/src/common/RefCountedObj.h index 2de1cf14ef3be..ef966463cda91 100644 --- a/src/common/RefCountedObj.h +++ b/src/common/RefCountedObj.h @@ -74,12 +74,7 @@ protected: private: void _get() const; -#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) - // crimson is single threaded at the moment - mutable uint64_t nref{1}; -#else mutable std::atomic nref{1}; -#endif CephContext *cct{nullptr}; };