From c406476c0309792c43df512dddb2fe0f19835e71 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Jan 2013 18:01:07 -0800 Subject: [PATCH] osd: hold lock while calling start_boot on startup This probably doesn't strictly matter because start_boot doesn't need the lock (currently) and few other threads should be running, but it is better to be consistent. Signed-off-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 c6b00aa660a25..0e3bade863adf 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1030,10 +1030,11 @@ int OSD::init() derr << "unable to obtain rotating service keys; retrying" << dendl; } + osd_lock.Lock(); + state = STATE_BOOTING; start_boot(); - osd_lock.Lock(); return 0; } -- 2.39.5