diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -822,7 +822,11 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, | |||
822 | * Store the swap location in the pte. | 822 | * Store the swap location in the pte. |
823 | * See handle_pte_fault() ... | 823 | * See handle_pte_fault() ... |
824 | */ | 824 | */ |
825 | swap_duplicate(entry); | 825 | if (swap_duplicate(entry) < 0) { |
826 | set_pte_at(mm, address, pte, pteval); | ||
827 | ret = SWAP_FAIL; | ||
828 | goto out_unmap; | ||
829 | } | ||
826 | if (list_empty(&mm->mmlist)) { | 830 | if (list_empty(&mm->mmlist)) { |
827 | spin_lock(&mmlist_lock); | 831 | spin_lock(&mmlist_lock); |
828 | if (list_empty(&mm->mmlist)) | 832 | if (list_empty(&mm->mmlist)) |