diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -529,10 +529,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma) | |||
529 | * If the page is mlock()d, we cannot swap it out. | 529 | * If the page is mlock()d, we cannot swap it out. |
530 | * If it's recently referenced (perhaps page_referenced | 530 | * If it's recently referenced (perhaps page_referenced |
531 | * skipped over this mm) then we should reactivate it. | 531 | * skipped over this mm) then we should reactivate it. |
532 | * | ||
533 | * Pages belonging to VM_RESERVED regions should not happen here. | ||
534 | */ | 532 | */ |
535 | if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) || | 533 | if ((vma->vm_flags & VM_LOCKED) || |
536 | ptep_clear_flush_young(vma, address, pte)) { | 534 | ptep_clear_flush_young(vma, address, pte)) { |
537 | ret = SWAP_FAIL; | 535 | ret = SWAP_FAIL; |
538 | goto out_unmap; | 536 | goto out_unmap; |
@@ -727,7 +725,7 @@ static int try_to_unmap_file(struct page *page) | |||
727 | 725 | ||
728 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 726 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, |
729 | shared.vm_set.list) { | 727 | shared.vm_set.list) { |
730 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) | 728 | if (vma->vm_flags & VM_LOCKED) |
731 | continue; | 729 | continue; |
732 | cursor = (unsigned long) vma->vm_private_data; | 730 | cursor = (unsigned long) vma->vm_private_data; |
733 | if (cursor > max_nl_cursor) | 731 | if (cursor > max_nl_cursor) |
@@ -761,7 +759,7 @@ static int try_to_unmap_file(struct page *page) | |||
761 | do { | 759 | do { |
762 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 760 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, |
763 | shared.vm_set.list) { | 761 | shared.vm_set.list) { |
764 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) | 762 | if (vma->vm_flags & VM_LOCKED) |
765 | continue; | 763 | continue; |
766 | cursor = (unsigned long) vma->vm_private_data; | 764 | cursor = (unsigned long) vma->vm_private_data; |
767 | while ( cursor < max_nl_cursor && | 765 | while ( cursor < max_nl_cursor && |
@@ -783,11 +781,8 @@ static int try_to_unmap_file(struct page *page) | |||
783 | * in locked vmas). Reset cursor on all unreserved nonlinear | 781 | * in locked vmas). Reset cursor on all unreserved nonlinear |
784 | * vmas, now forgetting on which ones it had fallen behind. | 782 | * vmas, now forgetting on which ones it had fallen behind. |
785 | */ | 783 | */ |
786 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 784 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list) |
787 | shared.vm_set.list) { | 785 | vma->vm_private_data = NULL; |
788 | if (!(vma->vm_flags & VM_RESERVED)) | ||
789 | vma->vm_private_data = NULL; | ||
790 | } | ||
791 | out: | 786 | out: |
792 | spin_unlock(&mapping->i_mmap_lock); | 787 | spin_unlock(&mapping->i_mmap_lock); |
793 | return ret; | 788 | return ret; |