[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4940836A.9010502@cn.fujitsu.com>
Date: Thu, 11 Dec 2008 11:05:14 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: menage@...gle.com
CC: kamezawa.hiroyu@...fujitsu.com, balbir@...ux.vnet.ibm.com,
containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [RFC][PATCH 1/3] CGroups: Add a per-subsystem hierarchy_mutex
> +static void cgroup_lock_hierarchy(struct cgroupfs_root *root)
> +{
> + /* We need to take each hierarchy_mutex in a consistent order */
This comment is not so clear. Do you mean for_each_subsys() can't be
used here?
But this function is used in cgroup.c internally, and always called
with cgroup_lock held, so it's OK to use for_each_subsys().
> + int i;
> +
> + for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
> + struct cgroup_subsys *ss = subsys[i];
> + if (ss->root == root)
> + mutex_lock_nested(&ss->hierarchy_mutex, i);
> + }
> +}
--
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