[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110906152129.c6136981.akpm@linux-foundation.org>
Date: Tue, 6 Sep 2011 15:21:29 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Paul Menage <paul@...lmenage.org>,
Li Zefan <lizf@...fujitsu.com>,
Johannes Weiner <hannes@...xchg.org>,
Aditya Kali <adityakali@...gle.com>,
Oleg Nesterov <oleg@...hat.com>,
Kay Sievers <kay.sievers@...y.org>,
Tim Hockin <thockin@...kin.org>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 06/12] cgroups: Add res counter common ancestor
searching
On Tue, 6 Sep 2011 02:13:00 +0200
Frederic Weisbecker <fweisbec@...il.com> wrote:
> +struct res_counter *
> +res_counter_common_ancestor(struct res_counter *r1, struct res_counter *r2)
> +{
> + struct res_counter *iter;
> +
> + while (r1) {
> + iter = r2;
> + while (iter) {
> + if (iter == r1)
> + return iter;
> + iter = iter->parent;
> + }
> +
> + r1 = r1->parent;
> + }
> +
> + return NULL;
> +}
cgroup_mutex, one assumes?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists