Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d37c4a9 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds
Browse files

memcg: bugfix check mem_cgroup_disabled() at split fixup



mem_cgroup_disabled() should be checked at splitting.  If disabled, no
heavy work is necesary.

Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: default avatarDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Reviewed-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 01c88e2d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2145,6 +2145,8 @@ void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail)
	struct page_cgroup *tail_pc = lookup_page_cgroup(tail);
	struct page_cgroup *tail_pc = lookup_page_cgroup(tail);
	unsigned long flags;
	unsigned long flags;


	if (mem_cgroup_disabled())
		return;
	/*
	/*
	 * We have no races with charge/uncharge but will have races with
	 * We have no races with charge/uncharge but will have races with
	 * page state accounting.
	 * page state accounting.