Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

From: Jan Engelhardt
Date: Tue Nov 17 2015 - 17:55:01 EST



On Tuesday 2015-11-17 20:40, Tejun Heo wrote:
>+static inline bool cgroup_is_descendant(struct cgroup *cgrp,
>+ struct cgroup *ancestor)

(const struct group *cgrp, const struct group *ancestor)

>+{
>+ if (cgrp->root != ancestor->root || cgrp->level < ancestor->level)
>+ return false;
>+ return cgrp->ancestor_ids[ancestor->level] == ancestor->id;
>+}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/