提交 0938a8f5 编写于 作者: L Linus Torvalds

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()
...@@ -2431,7 +2431,7 @@ static void __split_huge_page(struct page *page, struct list_head *list, ...@@ -2431,7 +2431,7 @@ static void __split_huge_page(struct page *page, struct list_head *list,
__split_huge_page_tail(head, i, lruvec, list); __split_huge_page_tail(head, i, lruvec, list);
/* Some pages can be beyond i_size: drop them from page cache */ /* Some pages can be beyond i_size: drop them from page cache */
if (head[i].index >= end) { if (head[i].index >= end) {
__ClearPageDirty(head + i); ClearPageDirty(head + i);
__delete_from_page_cache(head + i, NULL); __delete_from_page_cache(head + i, NULL);
if (IS_ENABLED(CONFIG_SHMEM) && PageSwapBacked(head)) if (IS_ENABLED(CONFIG_SHMEM) && PageSwapBacked(head))
shmem_uncharge(head->mapping->host, 1); shmem_uncharge(head->mapping->host, 1);
......
...@@ -1418,7 +1418,7 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode) ...@@ -1418,7 +1418,7 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
return ret; return ret;
mapping = page_mapping(page); mapping = page_mapping(page);
migrate_dirty = mapping && mapping->a_ops->migratepage; migrate_dirty = !mapping || mapping->a_ops->migratepage;
unlock_page(page); unlock_page(page);
if (!migrate_dirty) if (!migrate_dirty)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册