mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
OSD: pg might be removed during disconnect_session_watches
We don't hold the osd_lock between the session->watches traversal and the obc checks. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
047aecd90f
commit
dba096073a
@ -2431,7 +2431,12 @@ void OSD::disconnect_session_watches(Session *session)
|
||||
dout(10) << "obc=" << (void *)obc << dendl;
|
||||
|
||||
ReplicatedPG *pg = static_cast<ReplicatedPG *>(lookup_lock_raw_pg(oiter->second));
|
||||
assert(pg);
|
||||
if (!pg) {
|
||||
/* pg removed between watch_unlock.Unlock() and now, all related
|
||||
* watch structures would have been cleaned up in remove_watchers_and_notifies
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
service.watch_lock.Lock();
|
||||
/* NOTE! fix this one, should be able to just lookup entity name,
|
||||
however, we currently only keep EntityName on the session and not
|
||||
|
Loading…
Reference in New Issue
Block a user