Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250915
b: refs/heads/master
c: 275b12b
h: refs/heads/master
i:
  250913: 0476348
  250911: 4520d5b
v: v3
  • Loading branch information
Wu Fengguang authored and Linus Torvalds committed May 25, 2011
1 parent 20f0f80 commit 81d28c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1495f230fa7750479c79e3656286b9183d662077
refs/heads/master: 275b12bf5486f6f531111fd3d7dbbf01df427cfe
12 changes: 6 additions & 6 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,8 @@ static void do_sync_mmap_readahead(struct vm_area_struct *vma,
/* If we don't want any read-ahead, don't bother */
if (VM_RandomReadHint(vma))
return;
if (!ra->ra_pages)
return;

if (VM_SequentialReadHint(vma) ||
offset - 1 == (ra->prev_pos >> PAGE_CACHE_SHIFT)) {
Expand All @@ -1578,12 +1580,10 @@ static void do_sync_mmap_readahead(struct vm_area_struct *vma,
* mmap read-around
*/
ra_pages = max_sane_readahead(ra->ra_pages);
if (ra_pages) {
ra->start = max_t(long, 0, offset - ra_pages/2);
ra->size = ra_pages;
ra->async_size = 0;
ra_submit(ra, mapping, file);
}
ra->start = max_t(long, 0, offset - ra_pages / 2);
ra->size = ra_pages;
ra->async_size = 0;
ra_submit(ra, mapping, file);
}

/*
Expand Down

0 comments on commit 81d28c5

Please sign in to comment.