summaryrefslogtreecommitdiff
path: root/net/ceph/crush
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-06-22 19:44:05 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-07-07 17:25:19 +0200
commit5cf9c4a9959b6273675310d14a834ef14fbca37c (patch)
tree8ea2729271f9bcb06f6b1448ac066e57e1e21d27 /net/ceph/crush
parent069f3222ca96acfe8c59937e98c401bda5475b48 (diff)
libceph, crush: per-pool crush_choose_arg_map for crush_do_rule()
If there is no crush_choose_arg_map for a given pool, a NULL pointer is passed to preserve existing crush_do_rule() behavior. Reflects ceph.git commits 55fb91d64071552ea1bc65ab4ea84d3c8b73ab4b, dbe36e08be00c6519a8c89718dd47b0219c20516. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r--net/ceph/crush/crush.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ceph/crush/crush.c b/net/ceph/crush/crush.c
index 5bf94c04f645..4b428f46a8ca 100644
--- a/net/ceph/crush/crush.c
+++ b/net/ceph/crush/crush.c
@@ -1,6 +1,7 @@
#ifdef __KERNEL__
# include <linux/slab.h>
# include <linux/crush/crush.h>
+void clear_choose_args(struct crush_map *c);
#else
# include "crush_compat.h"
# include "crush.h"
@@ -127,6 +128,8 @@ void crush_destroy(struct crush_map *map)
#ifndef __KERNEL__
kfree(map->choose_tries);
+#else
+ clear_choose_args(map);
#endif
kfree(map);
}