tools/power/x86/intel-speed-select: v1.9 release
[linux-2.6-microblaze.git] / mm / swap.c
index ff910f6..31b844d 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -83,10 +83,8 @@ static void __page_cache_release(struct page *page)
                unsigned long flags;
 
                lruvec = lock_page_lruvec_irqsave(page, &flags);
-               VM_BUG_ON_PAGE(!PageLRU(page), page);
-               __ClearPageLRU(page);
                del_page_from_lru_list(page, lruvec);
-               page_off_lru(page);
+               __clear_page_lru_flags(page);
                unlock_page_lruvec_irqrestore(lruvec, flags);
        }
        __ClearPageWaiters(page);
@@ -910,10 +908,8 @@ void release_pages(struct page **pages, int nr)
                        if (prev_lruvec != lruvec)
                                lock_batch = 0;
 
-                       VM_BUG_ON_PAGE(!PageLRU(page), page);
-                       __ClearPageLRU(page);
                        del_page_from_lru_list(page, lruvec);
-                       page_off_lru(page);
+                       __clear_page_lru_flags(page);
                }
 
                __ClearPageWaiters(page);
@@ -1021,46 +1017,12 @@ void __pagevec_lru_add(struct pagevec *pvec)
        pagevec_reinit(pvec);
 }
 
-/**
- * pagevec_lookup_entries - gang pagecache lookup
- * @pvec:      Where the resulting entries are placed
- * @mapping:   The address_space to search
- * @start:     The starting entry index
- * @nr_entries:        The maximum number of pages
- * @indices:   The cache indices corresponding to the entries in @pvec
- *
- * pagevec_lookup_entries() will search for and return a group of up
- * to @nr_pages pages and shadow entries in the mapping.  All
- * entries are placed in @pvec.  pagevec_lookup_entries() takes a
- * reference against actual pages in @pvec.
- *
- * The search returns a group of mapping-contiguous entries with
- * ascending indexes.  There may be holes in the indices due to
- * not-present entries.
- *
- * Only one subpage of a Transparent Huge Page is returned in one call:
- * allowing truncate_inode_pages_range() to evict the whole THP without
- * cycling through a pagevec of extra references.
- *
- * pagevec_lookup_entries() returns the number of entries which were
- * found.
- */
-unsigned pagevec_lookup_entries(struct pagevec *pvec,
-                               struct address_space *mapping,
-                               pgoff_t start, unsigned nr_entries,
-                               pgoff_t *indices)
-{
-       pvec->nr = find_get_entries(mapping, start, nr_entries,
-                                   pvec->pages, indices);
-       return pagevec_count(pvec);
-}
-
 /**
  * pagevec_remove_exceptionals - pagevec exceptionals pruning
  * @pvec:      The pagevec to prune
  *
- * pagevec_lookup_entries() fills both pages and exceptional radix
- * tree entries into the pagevec.  This function prunes all
+ * find_get_entries() fills both pages and XArray value entries (aka
+ * exceptional entries) into the pagevec.  This function prunes all
  * exceptionals from @pvec without leaving holes, so that it can be
  * passed on to page-only pagevec operations.
  */