OSDN Git Service

Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[uclinux-h8/linux.git] / mm / swap.c
index 5dabf44..d8d9ee9 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -97,6 +97,16 @@ static void __put_compound_page(struct page *page)
 
 void __put_page(struct page *page)
 {
+       if (is_zone_device_page(page)) {
+               put_dev_pagemap(page->pgmap);
+
+               /*
+                * The page belongs to the device that created pgmap. Do
+                * not return it to page allocator.
+                */
+               return;
+       }
+
        if (unlikely(PageCompound(page)))
                __put_compound_page(page);
        else