diff options
Diffstat (limited to 'mm/readahead.c')
-rw-r--r-- | mm/readahead.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 033bc135a41f..337b20e946f6 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -501,6 +501,12 @@ void page_cache_sync_readahead(struct address_space *mapping, | |||
501 | if (!ra->ra_pages) | 501 | if (!ra->ra_pages) |
502 | return; | 502 | return; |
503 | 503 | ||
504 | /* be dumb */ | ||
505 | if (filp->f_mode & FMODE_RANDOM) { | ||
506 | force_page_cache_readahead(mapping, filp, offset, req_size); | ||
507 | return; | ||
508 | } | ||
509 | |||
504 | /* do read-ahead */ | 510 | /* do read-ahead */ |
505 | ondemand_readahead(mapping, ra, filp, false, offset, req_size); | 511 | ondemand_readahead(mapping, ra, filp, false, offset, req_size); |
506 | } | 512 | } |