OSDN Git Service

Merge tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[uclinux-h8/linux.git] / mm / khugepaged.c
index 1cdf7c3..a4e5eaf 100644 (file)
@@ -46,7 +46,6 @@ enum scan_result {
        SCAN_VMA_NULL,
        SCAN_VMA_CHECK,
        SCAN_ADDRESS_RANGE,
-       SCAN_SWAP_CACHE_PAGE,
        SCAN_DEL_PAGE_LRU,
        SCAN_ALLOC_HUGE_PAGE_FAIL,
        SCAN_CGROUP_CHARGE_FAIL,
@@ -683,16 +682,6 @@ static int __collapse_huge_page_isolate(struct vm_area_struct *vma,
                        result = SCAN_PAGE_COUNT;
                        goto out;
                }
-               if (!pte_write(pteval) && PageSwapCache(page) &&
-                               !reuse_swap_page(page)) {
-                       /*
-                        * Page is in the swap cache and cannot be re-used.
-                        * It cannot be collapsed into a THP.
-                        */
-                       unlock_page(page);
-                       result = SCAN_SWAP_CACHE_PAGE;
-                       goto out;
-               }
 
                /*
                 * Isolate the page to avoid collapsing an hugepage