/* Get the previous window size, ramp it up, and return it as the new window size.  */
static unsigned long get_next_ra_size(struct file_ra_state *ra, unsigned long max)
/* Get the previous window size, ramp it up, and return it as the new window size.  */
static unsigned long get_next_ra_size(struct file_ra_state *ra, unsigned long max)
{
	unsigned long cur = ra->size;
	unsigned long newsize;
	if (cur < max / 16)
		newsize = 4 * cur;
	else
		newsize = 2 * cur;
	return min(newsize, max);
}