lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 02 Dec 2008 11:18:19 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Paul Menage <menage@...gle.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux Containers <containers@...ts.linux-foundation.org>
Subject: Re: [PATCH 3/3] cgroups: introduce link_css_set() to remove duplicate
 	code

Paul Menage wrote:
> On Fri, Nov 28, 2008 at 2:02 AM, Li Zefan <lizf@...fujitsu.com> wrote:
>> Add a common function link_css_set() to link a css_set to a cgroup.
>>
>> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> 
> Overall the change looks like an improvement, but:
> 
> - the new function could do with comments about the semantics of its
> parameters, particularly tmp_cg_links.

How about:

/**
 * link_css_set - a helper function to link a css_set to a cgroup
 * @ tmp_cg_links: cg_cgroup_link objects allocated by allocate_cg_links()
 * @ cg: the css_set to be linked
 * @ cgrp: the destination cgroup
 */
static void link_css_set(struct list_head *tmp_cg_links,
			 struct css_set *cg, struct cgroup *cgrp)

> - why are you renaming cgrp -> root_cgrp in cgroup_get_sb()? That
> seems like unnecessary churn.
> 

Because we are linking all the css_sets to the root cgroup, so I think root_cgrp
helps readability.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ