memcontrol: add vm_match_cgroup()
authorDavid Rientjes <rientjes@google.com>
Sat, 9 Feb 2008 08:10:15 +0000 (00:10 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 9 Feb 2008 19:08:33 +0000 (11:08 -0800)
commit60c12b1202a60eabb1c61317e5d2678fcea9893f
tree143e5bdbd10d32832fce9183500deebad6c6e4db
parent6966a97753854c8b5336cf3997d5d1d205d91b12
memcontrol: add vm_match_cgroup()

mm_cgroup() is exclusively used to test whether an mm's mem_cgroup pointer
is pointing to a specific cgroup.  Instead of returning the pointer, we can
just do the test itself in a new macro:

vm_match_cgroup(mm, cgroup)

returns non-zero if the mm's mem_cgroup points to cgroup.  Otherwise it
returns zero.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/rmap.c