]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crush: crush_init_workspace starts with struct crush_work
authorIlya Dryomov <idryomov@gmail.com>
Thu, 22 Jun 2017 17:44:05 +0000 (19:44 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 7 Jul 2017 15:25:19 +0000 (17:25 +0200)
It is not just a pointer to crush_work, it is the whole structure.
That is not a problem since it only contains a pointer. But it will
be a problem if new data members are added to crush_work.

Reflects ceph.git commit ee957dd431bfbeb6dadaf77764db8e0757417328.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c

index 0b2646a9cc5096030291710bc8e24f533fb8c82d..9887fce04219aae72640af9a2c82f3cb768953ab 100644 (file)
@@ -858,7 +858,7 @@ void crush_init_workspace(const struct crush_map *map, void *v)
         * set the pointer first and then reserve the space for it to
         * point to by incrementing the point.
         */
-       v += sizeof(struct crush_work *);
+       v += sizeof(struct crush_work);
        w->work = v;
        v += map->max_buckets * sizeof(struct crush_work_bucket *);
        for (b = 0; b < map->max_buckets; ++b) {