]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crush/mapper.c
update sources to 12.2.7
[ceph.git] / ceph / src / crush / mapper.c
index e15039ed944b9b880647e73d8cafd38d9f6c4a46..76bc86d528e05f00fd31c7ffd7efca5be565a154 100644 (file)
@@ -306,8 +306,8 @@ static inline __u32 *get_choose_arg_weights(const struct crush_bucket_straw2 *bu
   if ((arg == NULL) ||
       (arg->weight_set == NULL))
     return bucket->item_weights;
-  if (position >= arg->weight_set_size)
-    position = arg->weight_set_size - 1;
+  if (position >= arg->weight_set_positions)
+    position = arg->weight_set_positions - 1;
   return arg->weight_set[position].weights;
 }