From b46fb62df3a411cc08b26ee626d60ec534c677c6 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 25 Jul 2013 13:52:16 -0700 Subject: [PATCH] osd: Don't put functional code inside of an assert Fix assert in OSDService::get_map() Signed-off-by: David Zafman Reviewed-by: Sage Weil --- src/osd/OSD.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3f226cec95d85..4be586f3d1556 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5524,7 +5524,8 @@ OSDMapRef OSDService::get_map(epoch_t epoch) if (epoch > 0) { dout(20) << "get_map " << epoch << " - loading and decoding " << map << dendl; bufferlist bl; - assert(_get_map_bl(epoch, bl)); + bool ok = _get_map_bl(epoch, bl); + assert(ok); map->decode(bl); } else { dout(20) << "get_map " << epoch << " - return initial " << map << dendl; -- 2.39.5