]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/interruptible_future: make sure
authorXuehan Xu <xuxuehan@qianxin.com>
Fri, 18 Aug 2023 03:19:10 +0000 (11:19 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Tue, 7 Nov 2023 08:44:47 +0000 (16:44 +0800)
interrupt_cond_t::ref_count won't overflow

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/common/interruptible_future.h

index ef780907ec886bcf579b6ac2247f9b15f1de96f6..cac6f65d1fd27b8de926591a5b065dee7bd67fb2 100644 (file)
@@ -114,6 +114,7 @@ struct interrupt_cond_t {
       ref_count);
   }
   void reset() {
+    assert(ref_count >= 1);
     if (--ref_count == 0) {
       INTR_FUT_DEBUG(
        "{}: clearing interrupt_cond: {},{}",