aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/crush
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-07-24 15:49:52 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-08-01 16:46:44 +0200
commitc7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 (patch)
tree7ec262c80b210ea5deefcc682c5c5dec03f7650a /net/ceph/crush
parentlibceph: fallback for when there isn't a pool-specific choose_arg (diff)
downloadlinux-dev-c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5.tar.xz
linux-dev-c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5.zip
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>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r--net/ceph/crush/mapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index 746b145bfd11..417df675c71b 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -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)