From: Kefu Chai Date: Tue, 15 Sep 2020 01:55:47 +0000 (+0800) Subject: crimson/osd: replace "ceph_abort_msg()" with assert() X-Git-Tag: v17.0.0~1121^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37131%2Fhead;p=ceph.git crimson/osd: replace "ceph_abort_msg()" with assert() these are programming errors, and are easy to detect. also assert() does not return, so compiler won't complain at seeing a branch does not return value in a function that returns value. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/object_context.h b/src/crimson/osd/object_context.h index 6f158bbd64ecf..8f25420948b0b 100644 --- a/src/crimson/osd/object_context.h +++ b/src/crimson/osd/object_context.h @@ -123,8 +123,7 @@ public: case RWState::RWNONE: return seastar::make_ready_future<>(); default: - ceph_abort_msg("invalid lock type"); - return seastar::make_ready_future<>(); + assert(0 == "invalid lock type"); } } @@ -139,8 +138,7 @@ public: case RWState::RWNONE: return; default: - ceph_abort_msg("invalid lock type"); - return; + assert(0 == "invalid lock type"); } }