From ca3ecc573c5f6daa5b17ee29ad728ba93536a4e2 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Thu, 15 Dec 2011 14:21:26 -0800 Subject: [PATCH] --- yaml --- r: 281472 b: refs/heads/master c: 29e21368b9baf9c4b25060d65062da2dda926c70 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/cgroup.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 5f00c40b6e99..8c384cccd612 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 52dcf8a1f8ac09b6ea21266ebdc4db6d52eea1fc +refs/heads/master: 29e21368b9baf9c4b25060d65062da2dda926c70 diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 1b3b84174ead..bc3caff138d8 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -2025,23 +2025,17 @@ static bool css_set_check_fetched(struct cgroup *cgrp, read_lock(&css_set_lock); newcg = find_existing_css_set(cg, cgrp, template); - if (newcg) - get_css_set(newcg); read_unlock(&css_set_lock); /* doesn't exist at all? */ if (!newcg) return false; /* see if it's already in the list */ - list_for_each_entry(cg_entry, newcg_list, links) { - if (cg_entry->cg == newcg) { - put_css_set(newcg); + list_for_each_entry(cg_entry, newcg_list, links) + if (cg_entry->cg == newcg) return true; - } - } /* not found */ - put_css_set(newcg); return false; }