OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 6/7] cgroup: remove duplicate code in find_css_set()
[PATCH 6/7] cgroup: remove duplicate code in find_css_set() [message #27501] Mon, 18 February 2008 05:49 Go to next message
Li Zefan is currently offline  Li Zefan
Messages: 90
Registered: February 2008
Member
The list head res->tasks gets initialized twice in find_css_set().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cgroup.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e8c8e58..71cf961 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -473,7 +473,6 @@ static struct css_set *find_css_set(
 	/* Link this cgroup group into the list */
 	list_add(&res->list, &init_css_set.list);
 	css_set_count++;
-	INIT_LIST_HEAD(&res->tasks);
 	write_unlock(&css_set_lock);
 
 	return res;
-- 
1.5.4.rc3

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH 6/7] cgroup: remove duplicate code in find_css_set() [message #27577 is a reply to message #27501] Wed, 20 February 2008 03:02 Go to previous message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On Feb 17, 2008 9:49 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
> The list head res->tasks gets initialized twice in find_css_set().
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Acked-by: Paul Menage <menage@google.com>

> ---
>  kernel/cgroup.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index e8c8e58..71cf961 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -473,7 +473,6 @@ static struct css_set *find_css_set(
>         /* Link this cgroup group into the list */
>         list_add(&res->list, &init_css_set.list);
>         css_set_count++;
> -       INIT_LIST_HEAD(&res->tasks);
>         write_unlock(&css_set_lock);
>
>         return res;
> --
> 1.5.4.rc3
>
>
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH 5/7] cgroup: fix subsys bitops
Next Topic: [PATCH 4/7] cgroup: fix memory leak in cgroup_get_sb()
Goto Forum:
  


Current Time: Sat Aug 17 15:14:08 GMT 2024

Total time taken to generate the page: 0.02802 seconds