~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to mm/migrate.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
         */
289
289
        __dec_zone_page_state(page, NR_FILE_PAGES);
290
290
        __inc_zone_page_state(newpage, NR_FILE_PAGES);
291
 
        if (PageSwapBacked(page)) {
 
291
        if (!PageSwapCache(page) && PageSwapBacked(page)) {
292
292
                __dec_zone_page_state(page, NR_SHMEM);
293
293
                __inc_zone_page_state(newpage, NR_SHMEM);
294
294
        }
721
721
                 * Only page_lock_anon_vma() understands the subtleties of
722
722
                 * getting a hold on an anon_vma from outside one of its mms.
723
723
                 */
724
 
                anon_vma = page_lock_anon_vma(page);
 
724
                anon_vma = page_get_anon_vma(page);
725
725
                if (anon_vma) {
726
726
                        /*
727
 
                         * Take a reference count on the anon_vma if the
728
 
                         * page is mapped so that it is guaranteed to
729
 
                         * exist when the page is remapped later
 
727
                         * Anon page
730
728
                         */
731
 
                        get_anon_vma(anon_vma);
732
 
                        page_unlock_anon_vma(anon_vma);
733
729
                } else if (PageSwapCache(page)) {
734
730
                        /*
735
731
                         * We cannot be sure that the anon_vma of an unmapped
857
853
                lock_page(hpage);
858
854
        }
859
855
 
860
 
        if (PageAnon(hpage)) {
861
 
                anon_vma = page_lock_anon_vma(hpage);
862
 
                if (anon_vma) {
863
 
                        get_anon_vma(anon_vma);
864
 
                        page_unlock_anon_vma(anon_vma);
865
 
                }
866
 
        }
 
856
        if (PageAnon(hpage))
 
857
                anon_vma = page_get_anon_vma(hpage);
867
858
 
868
859
        try_to_unmap(hpage, TTU_MIGRATION|TTU_IGNORE_MLOCK|TTU_IGNORE_ACCESS);
869
860