mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge pull request #1820 from ceph/wip-osd-refs
osd: fix a session ref leak, and an unlikely race Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
commit
f3925b2094
@ -2803,7 +2803,7 @@ void OSD::_add_heartbeat_peer(int p)
|
||||
hi->peer = p;
|
||||
HeartbeatSession *s = new HeartbeatSession(p);
|
||||
hi->con_back = cons.first.get();
|
||||
hi->con_back->set_priv(s);
|
||||
hi->con_back->set_priv(s->get());
|
||||
if (cons.second) {
|
||||
hi->con_front = cons.second.get();
|
||||
hi->con_front->set_priv(s->get());
|
||||
@ -2817,6 +2817,7 @@ void OSD::_add_heartbeat_peer(int p)
|
||||
<< " " << hi->con_back->get_peer_addr()
|
||||
<< dendl;
|
||||
}
|
||||
s->put();
|
||||
} else {
|
||||
hi = &i->second;
|
||||
}
|
||||
@ -3672,6 +3673,7 @@ void OSD::ms_handle_fast_connect(Connection *con)
|
||||
assert(con->get_peer_type() == CEPH_ENTITY_TYPE_OSD);
|
||||
s->entity_name.set_type(CEPH_ENTITY_TYPE_OSD);
|
||||
}
|
||||
s->put();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user