aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index dd43373a483f..710bb4b2adf1 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -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))