crush: assume weight_set != null imples weight_set_size > 0
Reflects ceph.git commit 5e8fa3e06b68fae1582c9230a3a8d1abc6146286. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
@@ -306,7 +306,7 @@ static __u32 *get_choose_arg_weights(const struct crush_bucket_straw2 *bucket,
|
||||
const struct crush_choose_arg *arg,
|
||||
int position)
|
||||
{
|
||||
if (!arg || !arg->weight_set || arg->weight_set_size == 0)
|
||||
if (!arg || !arg->weight_set)
|
||||
return bucket->item_weights;
|
||||
|
||||
if (position >= arg->weight_set_size)
|
||||
|
Reference in New Issue
Block a user