Skip to content

Commit

Permalink
OSD: _have_pg should return NULL if pg is not in map
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Just <[email protected]>
  • Loading branch information
Samuel Just authored and Sage Weil committed Jun 7, 2012
1 parent ff47010 commit 36a3979
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/osd/OSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 36a3979

Please sign in to comment.