mirror of
https://github.com/ceph/ceph
synced 2025-01-29 22:43:40 +00:00
Merge pull request #18636 from tchaikov/wip-osdmap-cleanup
osd/OSDMap: remove the unnecessary checks for null Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
8818a1939d
@ -2051,10 +2051,8 @@ void OSDMap::pg_to_raw_osds(pg_t pg, vector<int> *raw, int *primary) const
|
||||
{
|
||||
const pg_pool_t *pool = get_pg_pool(pg.pool());
|
||||
if (!pool) {
|
||||
if (primary)
|
||||
*primary = -1;
|
||||
if (raw)
|
||||
raw->clear();
|
||||
*primary = -1;
|
||||
raw->clear();
|
||||
return;
|
||||
}
|
||||
_pg_to_raw_osds(*pool, pg, raw, NULL);
|
||||
@ -2065,10 +2063,8 @@ void OSDMap::pg_to_raw_up(pg_t pg, vector<int> *up, int *primary) const
|
||||
{
|
||||
const pg_pool_t *pool = get_pg_pool(pg.pool());
|
||||
if (!pool) {
|
||||
if (primary)
|
||||
*primary = -1;
|
||||
if (up)
|
||||
up->clear();
|
||||
*primary = -1;
|
||||
up->clear();
|
||||
return;
|
||||
}
|
||||
vector<int> raw;
|
||||
|
Loading…
Reference in New Issue
Block a user