diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 1 | ||||
-rw-r--r-- | mm/huge_memory.c | 13 | ||||
-rw-r--r-- | mm/hugetlb.c | 1 | ||||
-rw-r--r-- | mm/vmscan.c | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index a82fbe4c9e8e..5020b280a771 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2581,7 +2581,6 @@ EXPORT_SYMBOL(generic_perform_write); | |||
2581 | * @iocb: IO state structure (file, offset, etc.) | 2581 | * @iocb: IO state structure (file, offset, etc.) |
2582 | * @iov: vector with data to write | 2582 | * @iov: vector with data to write |
2583 | * @nr_segs: number of segments in the vector | 2583 | * @nr_segs: number of segments in the vector |
2584 | * @ppos: position where to write | ||
2585 | * | 2584 | * |
2586 | * This function does all the work needed for actually writing data to a | 2585 | * This function does all the work needed for actually writing data to a |
2587 | * file. It does all basic checks, removes SUID from the file, updates | 2586 | * file. It does all basic checks, removes SUID from the file, updates |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 64635f5278ff..b4b1feba6472 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -1536,16 +1536,23 @@ pmd_t *page_check_address_pmd(struct page *page, | |||
1536 | enum page_check_address_pmd_flag flag, | 1536 | enum page_check_address_pmd_flag flag, |
1537 | spinlock_t **ptl) | 1537 | spinlock_t **ptl) |
1538 | { | 1538 | { |
1539 | pgd_t *pgd; | ||
1540 | pud_t *pud; | ||
1539 | pmd_t *pmd; | 1541 | pmd_t *pmd; |
1540 | 1542 | ||
1541 | if (address & ~HPAGE_PMD_MASK) | 1543 | if (address & ~HPAGE_PMD_MASK) |
1542 | return NULL; | 1544 | return NULL; |
1543 | 1545 | ||
1544 | pmd = mm_find_pmd(mm, address); | 1546 | pgd = pgd_offset(mm, address); |
1545 | if (!pmd) | 1547 | if (!pgd_present(*pgd)) |
1546 | return NULL; | 1548 | return NULL; |
1549 | pud = pud_offset(pgd, address); | ||
1550 | if (!pud_present(*pud)) | ||
1551 | return NULL; | ||
1552 | pmd = pmd_offset(pud, address); | ||
1553 | |||
1547 | *ptl = pmd_lock(mm, pmd); | 1554 | *ptl = pmd_lock(mm, pmd); |
1548 | if (pmd_none(*pmd)) | 1555 | if (!pmd_present(*pmd)) |
1549 | goto unlock; | 1556 | goto unlock; |
1550 | if (pmd_page(*pmd) != page) | 1557 | if (pmd_page(*pmd) != page) |
1551 | goto unlock; | 1558 | goto unlock; |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index dd30f22b35e0..246192929a2d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1172,6 +1172,7 @@ static void return_unused_surplus_pages(struct hstate *h, | |||
1172 | while (nr_pages--) { | 1172 | while (nr_pages--) { |
1173 | if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1)) | 1173 | if (!free_pool_huge_page(h, &node_states[N_MEMORY], 1)) |
1174 | break; | 1174 | break; |
1175 | cond_resched_lock(&hugetlb_lock); | ||
1175 | } | 1176 | } |
1176 | } | 1177 | } |
1177 | 1178 | ||
diff --git a/mm/vmscan.c b/mm/vmscan.c index 9b6497eda806..3f56c8deb3c0 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1158,7 +1158,7 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone, | |||
1158 | TTU_UNMAP|TTU_IGNORE_ACCESS, | 1158 | TTU_UNMAP|TTU_IGNORE_ACCESS, |
1159 | &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, true); | 1159 | &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, true); |
1160 | list_splice(&clean_pages, page_list); | 1160 | list_splice(&clean_pages, page_list); |
1161 | __mod_zone_page_state(zone, NR_ISOLATED_FILE, -ret); | 1161 | mod_zone_page_state(zone, NR_ISOLATED_FILE, -ret); |
1162 | return ret; | 1162 | return ret; |
1163 | } | 1163 | } |
1164 | 1164 | ||