diff options
-rw-r--r-- | kernel/memremap.c | 1 | ||||
-rw-r--r-- | mm/hmm.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c index 5857267a4af5..62603634a1d2 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -339,7 +339,6 @@ void __put_devmap_managed_page(struct page *page) __ClearPageActive(page); __ClearPageWaiters(page); - page->mapping = NULL; mem_cgroup_uncharge(page); page->pgmap->page_free(page, page->pgmap->data); @@ -963,6 +963,8 @@ static void hmm_devmem_free(struct page *page, void *data) { struct hmm_devmem *devmem = data; + page->mapping = NULL; + devmem->ops->free(devmem, page); } |