Commit bfb16d7d authored by Ilya Dryomov's avatar Ilya Dryomov

crush: factor out (trivial) crush_destroy_rule()

Reflects ceph.git commit 43a01c9973c4b83f2eaa98be87429941a227ddde.
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent b3b33b0e
...@@ -174,6 +174,7 @@ extern void crush_destroy_bucket_list(struct crush_bucket_list *b); ...@@ -174,6 +174,7 @@ extern void crush_destroy_bucket_list(struct crush_bucket_list *b);
extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b); extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b);
extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b); extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b);
extern void crush_destroy_bucket(struct crush_bucket *b); extern void crush_destroy_bucket(struct crush_bucket *b);
extern void crush_destroy_rule(struct crush_rule *r);
extern void crush_destroy(struct crush_map *map); extern void crush_destroy(struct crush_map *map);
static inline int crush_calc_tree_node(int i) static inline int crush_calc_tree_node(int i)
......
...@@ -116,11 +116,14 @@ void crush_destroy(struct crush_map *map) ...@@ -116,11 +116,14 @@ void crush_destroy(struct crush_map *map)
if (map->rules) { if (map->rules) {
__u32 b; __u32 b;
for (b = 0; b < map->max_rules; b++) for (b = 0; b < map->max_rules; b++)
kfree(map->rules[b]); crush_destroy_rule(map->rules[b]);
kfree(map->rules); kfree(map->rules);
} }
kfree(map); kfree(map);
} }
void crush_destroy_rule(struct crush_rule *rule)
{
kfree(rule);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment