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

Commit 33c5d3d6 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds
Browse files

memcg: bugfix for memory hotplug



The start pfn calculation in page_cgroup's memory hotplug notifier chain
is wrong.

Tested-by: default avatarBadari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6cdfcc27
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ int online_page_cgroup(unsigned long start_pfn,
	unsigned long start, end, pfn;
	int fail = 0;

	start = start_pfn & (PAGES_PER_SECTION - 1);
	start = start_pfn & ~(PAGES_PER_SECTION - 1);
	end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);

	for (pfn = start; !fail && pfn < end; pfn += PAGES_PER_SECTION) {
@@ -188,7 +188,7 @@ int offline_page_cgroup(unsigned long start_pfn,
{
	unsigned long start, end, pfn;

	start = start_pfn & (PAGES_PER_SECTION - 1);
	start = start_pfn & ~(PAGES_PER_SECTION - 1);
	end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);

	for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION)