mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
OSD: _have_pg should return NULL if pg is not in map
Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
ff470104d1
commit
36a3979590
@ -1236,7 +1236,8 @@ bool OSD::_have_pg(pg_t pgid)
|
||||
PG *OSD::_lookup_lock_pg(pg_t pgid)
|
||||
{
|
||||
assert(osd_lock.is_locked());
|
||||
assert(pg_map.count(pgid));
|
||||
if (!pg_map.count(pgid))
|
||||
return NULL;
|
||||
PG *pg = pg_map[pgid];
|
||||
pg->lock();
|
||||
return pg;
|
||||
|
Loading…
Reference in New Issue
Block a user