memcgroup: fix spurious EBUSY on memory cgroup removal
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 28 Mar 2008 21:15:50 +0000 (14:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Mar 2008 21:45:21 +0000 (14:45 -0700)
commit1d4a788f15302877ff2cb08f22009e290a36a209
tree51d2733fb81a75903e4b0f8a5d2ce9f903361ff0
parent8c703d35fa91911dd92a18c31a718853f483ad80
memcgroup: fix spurious EBUSY on memory cgroup removal

Call mm_free_cgroup earlier.  Otherwise a reference due to lazy mm switching
can prevent cgroup removal.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/fork.c