Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cgroup hierarchy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matt Helsley
Date: Friday, October 22, 2010 - 2:38 pm

On Fri, Oct 22, 2010 at 04:09:56PM +0800, Li Zefan wrote:

<snip>


<snip>


You could just say it's a depth-first walk except we process the parent before
its children.


<snip>


Is there something wrong with the indentation here? I can't
see the closing brace for the "if (root->number_of_cgroups > 1)"
that should precede the for_each_set_bit() loop below.


I think you could avoid the can_bind flag field entirely and do:

			if (!subsys[i]->bind)

Also, if we're going with my "split out unbind" suggestion I think
the part here would be:

		for_each_set_bit(i, &removed_bits, CGROUP_SUBSYS_COUNT)
			if (!subsys[i]->unbind)
				return -EBUSY;

<snip>

Cheers,
	-Matt Helsley
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Li Zefan, (Fri Oct 22, 1:09 am)
Re: [PATCH 2/7] cgroups: Allow to bind a subsystem to a cg ..., Matt Helsley, (Fri Oct 22, 2:38 pm)
Re: [PATCH 7/7] cgroups: Update documentation for bindable ..., KAMEZAWA Hiroyuki, (Sun Oct 24, 5:36 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Thu Oct 28, 4:34 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 2:05 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 6:53 pm)
Re: [PATCH 1/7] cgroups: Shrink struct cgroup_subsys, Paul Menage, (Tue Nov 9, 7:15 pm)