mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
Merge pull request #7344 from songbaisen/song8
crush: add safety assert Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
ace46dadb4
@ -176,7 +176,7 @@ int crush_add_bucket(struct crush_map *map,
|
||||
int crush_remove_bucket(struct crush_map *map, struct crush_bucket *bucket)
|
||||
{
|
||||
int pos = -1 - bucket->id;
|
||||
|
||||
assert(pos < map->max_buckets);
|
||||
map->buckets[pos] = NULL;
|
||||
crush_destroy_bucket(bucket);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user