diff options
-rw-r--r-- | mm/filemap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 827536485599..99977f0a94e4 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1472,7 +1472,8 @@ static void do_sync_mmap_readahead(struct vm_area_struct *vma, | |||
1472 | if (VM_RandomReadHint(vma)) | 1472 | if (VM_RandomReadHint(vma)) |
1473 | return; | 1473 | return; |
1474 | 1474 | ||
1475 | if (VM_SequentialReadHint(vma)) { | 1475 | if (VM_SequentialReadHint(vma) || |
1476 | offset - 1 == (ra->prev_pos >> PAGE_CACHE_SHIFT)) { | ||
1476 | page_cache_sync_readahead(mapping, ra, file, offset, 1); | 1477 | page_cache_sync_readahead(mapping, ra, file, offset, 1); |
1477 | return; | 1478 | return; |
1478 | } | 1479 | } |