aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-02 12:44:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-02 12:44:15 -0400
commit0938a8f52d10fc917eecc5c1b2fb7d3a7dedfa41 (patch)
tree5fc6b86ed716987c2c6817447314b2890d68629c
parent0512e0134582ef85dee77d51aae77dcd1edec495 (diff)
parent145e1a71e090575c74969e3daa8136d1e5b99fc8 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge two fixes from Andrew Morton. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: fix the NULL mapping case in __isolate_lru_page() mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty()
-rw-r--r--mm/huge_memory.c2
-rw-r--r--mm/vmscan.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index a3a1815f8e11..b9f3dbd885bd 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2431,7 +2431,7 @@ static void __split_huge_page(struct page *page, struct list_head *list,
2431 __split_huge_page_tail(head, i, lruvec, list); 2431 __split_huge_page_tail(head, i, lruvec, list);
2432 /* Some pages can be beyond i_size: drop them from page cache */ 2432 /* Some pages can be beyond i_size: drop them from page cache */
2433 if (head[i].index >= end) { 2433 if (head[i].index >= end) {
2434 __ClearPageDirty(head + i); 2434 ClearPageDirty(head + i);
2435 __delete_from_page_cache(head + i, NULL); 2435 __delete_from_page_cache(head + i, NULL);
2436 if (IS_ENABLED(CONFIG_SHMEM) && PageSwapBacked(head)) 2436 if (IS_ENABLED(CONFIG_SHMEM) && PageSwapBacked(head))
2437 shmem_uncharge(head->mapping->host, 1); 2437 shmem_uncharge(head->mapping->host, 1);
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9b697323a88c..9270a4370d54 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1418,7 +1418,7 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
1418 return ret; 1418 return ret;
1419 1419
1420 mapping = page_mapping(page); 1420 mapping = page_mapping(page);
1421 migrate_dirty = mapping && mapping->a_ops->migratepage; 1421 migrate_dirty = !mapping || mapping->a_ops->migratepage;
1422 unlock_page(page); 1422 unlock_page(page);
1423 if (!migrate_dirty) 1423 if (!migrate_dirty)
1424 return ret; 1424 return ret;