Commit 33c5d3d64589c5d379db5a5615735f6d08438369
Committed by
Linus Torvalds
1 parent
6cdfcc275e
Exists in
master
and in
4 other branches
memcg: bugfix for memory hotplug
The start pfn calculation in page_cgroup's memory hotplug notifier chain is wrong. Tested-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
mm/page_cgroup.c
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | unsigned long start, end, pfn; |
166 | 166 | int fail = 0; |
167 | 167 | |
168 | - start = start_pfn & (PAGES_PER_SECTION - 1); | |
168 | + start = start_pfn & ~(PAGES_PER_SECTION - 1); | |
169 | 169 | end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION); |
170 | 170 | |
171 | 171 | for (pfn = start; !fail && pfn < end; pfn += PAGES_PER_SECTION) { |
... | ... | @@ -188,7 +188,7 @@ |
188 | 188 | { |
189 | 189 | unsigned long start, end, pfn; |
190 | 190 | |
191 | - start = start_pfn & (PAGES_PER_SECTION - 1); | |
191 | + start = start_pfn & ~(PAGES_PER_SECTION - 1); | |
192 | 192 | end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION); |
193 | 193 | |
194 | 194 | for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) |