Merge tag 'iio-fixes-for-5.12a' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / mm / swap.c
index 1455fa5..31b844d 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -83,7 +83,6 @@ 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);
                del_page_from_lru_list(page, lruvec);
                __clear_page_lru_flags(page);
                unlock_page_lruvec_irqrestore(lruvec, flags);
@@ -909,7 +908,6 @@ void release_pages(struct page **pages, int nr)
                        if (prev_lruvec != lruvec)
                                lock_batch = 0;
 
-                       VM_BUG_ON_PAGE(!PageLRU(page), page);
                        del_page_from_lru_list(page, lruvec);
                        __clear_page_lru_flags(page);
                }
@@ -1019,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.
  */