mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
readahead: apply max_sane_readahead() limit in ondemand_readahead()
Just in case someone aggressively sets a huge readahead size. Cc: Nick Piggin <[email protected]> Signed-off-by: Wu Fengguang <[email protected]> Cc: Ying Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f7e839dd36
commit
fc31d16add
1 changed files with 1 additions and 1 deletions
|
|
@ -357,7 +357,7 @@ ondemand_readahead(struct address_space *mapping,
|
|||
bool hit_readahead_marker, pgoff_t offset,
|
||||
unsigned long req_size)
|
||||
{
|
||||
int max = ra->ra_pages; /* max readahead pages */
|
||||
unsigned long max = max_sane_readahead(ra->ra_pages);
|
||||
pgoff_t prev_offset;
|
||||
int sequential;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue