|
@@ -1436,7 +1436,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
|
|
* discarded. Remap the page to page table.
|
|
* discarded. Remap the page to page table.
|
|
*/
|
|
*/
|
|
set_pte_at(mm, address, pvmw.pte, pteval);
|
|
set_pte_at(mm, address, pvmw.pte, pteval);
|
|
- ret = SWAP_DIRTY;
|
|
|
|
|
|
+ SetPageSwapBacked(page);
|
|
|
|
+ ret = SWAP_FAIL;
|
|
page_vma_mapped_walk_done(&pvmw);
|
|
page_vma_mapped_walk_done(&pvmw);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -1506,7 +1507,6 @@ static int page_mapcount_is_zero(struct page *page)
|
|
* SWAP_AGAIN - we missed a mapping, try again later
|
|
* SWAP_AGAIN - we missed a mapping, try again later
|
|
* SWAP_FAIL - the page is unswappable
|
|
* SWAP_FAIL - the page is unswappable
|
|
* SWAP_MLOCK - page is mlocked.
|
|
* SWAP_MLOCK - page is mlocked.
|
|
- * SWAP_DIRTY - page is dirty MADV_FREE page
|
|
|
|
*/
|
|
*/
|
|
int try_to_unmap(struct page *page, enum ttu_flags flags)
|
|
int try_to_unmap(struct page *page, enum ttu_flags flags)
|
|
{
|
|
{
|