Make possible large readahead values harmless. The stock readahead is protected by always consulting the avaiable memory before applying this number. Other readahead paths have already did so. Signed-off-by: Wu Fengguang Signed-off-by: Andrew Morton --- linux-2.6.19-rc5-mm2.orig/mm/readahead.c +++ linux-2.6.19-rc5-mm2/mm/readahead.c @@ -143,7 +143,7 @@ EXPORT_SYMBOL_GPL(file_ra_state_init); */ static inline unsigned long get_max_readahead(struct file_ra_state *ra) { - return ra->ra_pages; + return max_sane_readahead(ra->ra_pages); } static inline unsigned long get_min_readahead(struct file_ra_state *ra) -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/