mm/swap: remove confusing checking for non_swap_entry() in swap_ra_info()
[linux-2.6-microblaze.git] / mm / swap_state.c
index fb7efa0..df54053 100644 (file)
@@ -132,7 +132,6 @@ int add_to_swap_cache(struct page *page, swp_entry_t entry,
                        xas_store(&xas, page);
                        xas_next(&xas);
                }
-               address_space->nrexceptional -= nr_shadows;
                address_space->nrpages += nr;
                __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, nr);
                __mod_lruvec_page_state(page, NR_SWAPCACHE, nr);
@@ -172,8 +171,6 @@ void __delete_from_swap_cache(struct page *page,
                xas_next(&xas);
        }
        ClearPageSwapCache(page);
-       if (shadow)
-               address_space->nrexceptional += nr;
        address_space->nrpages -= nr;
        __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, -nr);
        __mod_lruvec_page_state(page, NR_SWAPCACHE, -nr);
@@ -275,7 +272,6 @@ void clear_shadow_from_swap_cache(int type, unsigned long begin,
                        xas_store(&xas, NULL);
                        nr_shadows++;
                }
-               address_space->nrexceptional -= nr_shadows;
                xa_unlock_irq(&address_space->i_pages);
 
                /* search the next swapcache until we meet end */
@@ -725,7 +721,6 @@ static void swap_ra_info(struct vm_fault *vmf,
 {
        struct vm_area_struct *vma = vmf->vma;
        unsigned long ra_val;
-       swp_entry_t entry;
        unsigned long faddr, pfn, fpfn;
        unsigned long start, end;
        pte_t *pte, *orig_pte;
@@ -743,11 +738,6 @@ static void swap_ra_info(struct vm_fault *vmf,
 
        faddr = vmf->address;
        orig_pte = pte = pte_offset_map(vmf->pmd, faddr);
-       entry = pte_to_swp_entry(*pte);
-       if ((unlikely(non_swap_entry(entry)))) {
-               pte_unmap(orig_pte);
-               return;
-       }
 
        fpfn = PFN_DOWN(faddr);
        ra_val = GET_SWAP_RA_VAL(vma);
@@ -796,7 +786,7 @@ static void swap_ra_info(struct vm_fault *vmf,
  *
  * Returns the struct page for entry and addr, after queueing swapin.
  *
- * Primitive swap readahead code. We simply read in a few pages whoes
+ * Primitive swap readahead code. We simply read in a few pages whose
  * virtual addresses are around the fault address in the same vma.
  *
  * Caller must hold read mmap_lock if vmf->vma is not NULL.