]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: use atomic counter for RefCountedObject as with classic 51827/head
authorchunmei <chunmei.liu@intel.com>
Tue, 30 May 2023 08:36:31 +0000 (08:36 +0000)
committerchunmei <chunmei.liu@intel.com>
Tue, 6 Jun 2023 03:03:37 +0000 (03:03 +0000)
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 <chunmei.liu@intel.com>
src/common/RefCountedObj.h

index 2de1cf14ef3be19c8f81831488330600a59d0986..ef966463cda91c4a62583b8cae4e49217be31f9a 100644 (file)
@@ -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<uint64_t> nref{1};
-#endif
   CephContext *cct{nullptr};
 };