summaryrefslogtreecommitdiffstats
path: root/net/ceph/crush
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2013-12-24 20:19:24 +0100
committerIlya Dryomov <ilya.dryomov@inktank.com>2013-12-31 19:32:11 +0100
commitbfb16d7d69f0272451ad85a6e50aab3c4262fbc0 (patch)
tree411212756451fde3e9e4e6d74d946f9e94ba2f16 /net/ceph/crush
parentcrush: pass weight vector size to map function (diff)
downloadlinux-bfb16d7d69f0272451ad85a6e50aab3c4262fbc0.tar.xz
linux-bfb16d7d69f0272451ad85a6e50aab3c4262fbc0.zip
crush: factor out (trivial) crush_destroy_rule()
Reflects ceph.git commit 43a01c9973c4b83f2eaa98be87429941a227ddde. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r--net/ceph/crush/crush.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ceph/crush/crush.c b/net/ceph/crush/crush.c
index 089613234f03..16bc199d9a62 100644
--- a/net/ceph/crush/crush.c
+++ b/net/ceph/crush/crush.c
@@ -116,11 +116,14 @@ void crush_destroy(struct crush_map *map)
if (map->rules) {
__u32 b;
for (b = 0; b < map->max_rules; b++)
- kfree(map->rules[b]);
+ crush_destroy_rule(map->rules[b]);
kfree(map->rules);
}
kfree(map);
}
-
+void crush_destroy_rule(struct crush_rule *rule)
+{
+ kfree(rule);
+}