lkml.org 
[lkml]   [2015]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

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;
>+}


\
 
 \ /
  Last update: 2015-11-18 00:21    [W:0.119 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site