/* The code ramps up the readahead size aggressively at first, but slow down as it approaches max_readhead. Count contiguously cached pages from @offset-1 to @offset-@max, this count is a conservative estimation of */
static pgoff_t count_history_pages(struct address_space *mapping, struct file_ra_state *ra, pgoff_t offset, unsigned long max)
/* The code ramps up the readahead size aggressively at first, but slow down as it approaches max_readhead. Count contiguously cached pages from @offset-1 to @offset-@max, this count is a conservative estimation of */
static pgoff_t count_history_pages(struct address_space *mapping, struct file_ra_state *ra, pgoff_t offset, unsigned long max)
{
	pgoff_t head;
	rcu_read_lock();
	head = radix_tree_prev_hole(&mapping->page_tree, offset - 1, max);
	rcu_read_unlock();
	return offset - 1 - head;
}