summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-12-16 12:19:59 +0100
committerAndi Kleen <ak@linux.intel.com>2009-12-16 12:19:59 +0100
commitd324236b3333e87c8825b35f2104184734020d35 (patch)
treee8ad6b50e50f975b692cc6a15d5812a51d0047ad /mm
parente42d9d5d47961fb5db0be65b56dd52fe7b2421f1 (diff)
downloadblackbird-op-linux-d324236b3333e87c8825b35f2104184734020d35.tar.gz
blackbird-op-linux-d324236b3333e87c8825b35f2104184734020d35.zip
memcg: add accessor to mem_cgroup.css
So that an outside user can free the reference count grabbed by try_get_mem_cgroup_from_page(). CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> CC: Hugh Dickins <hugh.dickins@tiscali.co.uk> CC: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> CC: Balbir Singh <balbir@linux.vnet.ibm.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b5ac61ce7346..9eee80d6d490 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -282,6 +282,11 @@ mem_cgroup_zoneinfo(struct mem_cgroup *mem, int nid, int zid)
return &mem->info.nodeinfo[nid]->zoneinfo[zid];
}
+struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem)
+{
+ return &mem->css;
+}
+
static struct mem_cgroup_per_zone *
page_cgroup_zoneinfo(struct page_cgroup *pc)
{
OpenPOWER on IntegriCloud