diff options
author | Sage Weil <sage@redhat.com> | 2018-10-28 09:41:01 -0500 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2018-10-28 09:41:01 -0500 |
commit | b17398aea8772f1e874d2e99835a96367848afa9 (patch) | |
tree | e2ad3ea84bfd5398f671c73261e1d4acac871868 | |
parent | f755bed3e438d2e7d5ed0df30b8d5bebf2d0cf5a (diff) | |
parent | 51d8e2457d73c709bfa4f706793696b3ce704ff9 (diff) | |
download | ceph-b17398aea8772f1e874d2e99835a96367848afa9.tar.gz |
Merge PR #24780 into nautilus
* refs/pull/24780/head:
osd: take heartbeat_lock before checking for session
Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
-rw-r--r-- | src/osd/OSD.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5479b598dc6..834083fabe7 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4957,9 +4957,9 @@ void OSD::heartbeat() bool OSD::heartbeat_reset(Connection *con) { + std::lock_guard l(heartbeat_lock); auto s = con->get_priv(); if (s) { - heartbeat_lock.Lock(); if (is_stopping()) { heartbeat_lock.Unlock(); return true; @@ -4996,7 +4996,6 @@ bool OSD::heartbeat_reset(Connection *con) } else { dout(10) << "heartbeat_reset closing (old) failed hb con " << con << dendl; } - heartbeat_lock.Unlock(); } return true; } |