mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
thp: fix another corner case of munlock() vs. THPs
am: 1771fc58a3
Change-Id: Ib24b4d9f9a51c22c36ca49ce28916992267e9400
This commit is contained in:
@@ -441,7 +441,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma,
|
||||
|
||||
while (start < end) {
|
||||
struct page *page;
|
||||
unsigned int page_mask;
|
||||
unsigned int page_mask = 0;
|
||||
unsigned long page_increm;
|
||||
struct pagevec pvec;
|
||||
struct zone *zone;
|
||||
@@ -455,8 +455,7 @@ void munlock_vma_pages_range(struct vm_area_struct *vma,
|
||||
* suits munlock very well (and if somehow an abnormal page
|
||||
* has sneaked into the range, we won't oops here: great).
|
||||
*/
|
||||
page = follow_page_mask(vma, start, FOLL_GET | FOLL_DUMP,
|
||||
&page_mask);
|
||||
page = follow_page(vma, start, FOLL_GET | FOLL_DUMP);
|
||||
|
||||
if (page && !IS_ERR(page)) {
|
||||
if (PageTransTail(page)) {
|
||||
@@ -467,8 +466,8 @@ void munlock_vma_pages_range(struct vm_area_struct *vma,
|
||||
/*
|
||||
* Any THP page found by follow_page_mask() may
|
||||
* have gotten split before reaching
|
||||
* munlock_vma_page(), so we need to recompute
|
||||
* the page_mask here.
|
||||
* munlock_vma_page(), so we need to compute
|
||||
* the page_mask here instead.
|
||||
*/
|
||||
page_mask = munlock_vma_page(page);
|
||||
unlock_page(page);
|
||||
|
||||
Reference in New Issue
Block a user