* uptodate then the caller will launch readpage again, and
* will then handle the error.
*/
- for (page_idx = 0; page_idx < nr_to_really_read; page_idx++) {
- if (list_empty(&page_pool))
- BUG();
- page = list_entry(page_pool.prev, struct page, list);
- list_del(&page->list);
- if (!add_to_page_cache_unique(page, mapping, page->index))
- mapping->a_ops->readpage(file, page);
- page_cache_release(page);
- }
-
- /*
- * Do this now, rather than at the next wait_on_page_locked().
- */
+ read_pages(mapping, &page_pool, nr_to_really_read);
- run_task_queue(&tq_disk);
+ blk_run_queues();
-
- if (!list_empty(&page_pool))
- BUG();
-
+ BUG_ON(!list_empty(&page_pool));
return;
}