mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
readahead: mmap read-around simplification
Fold file_ra_state.mmap_hit into file_ra_state.mmap_miss and make it an int. Signed-off-by: Fengguang Wu <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
937085aa35
commit
0bb7ba6b9c
2 changed files with 3 additions and 4 deletions
|
|
@ -1349,7 +1349,7 @@ retry_find:
|
|||
* Do we miss much more than hit in this file? If so,
|
||||
* stop bothering with read-ahead. It will only hurt.
|
||||
*/
|
||||
if (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS)
|
||||
if (ra->mmap_miss > MMAP_LOTSAMISS)
|
||||
goto no_cached_page;
|
||||
|
||||
/*
|
||||
|
|
@ -1375,7 +1375,7 @@ retry_find:
|
|||
}
|
||||
|
||||
if (!did_readaround)
|
||||
ra->mmap_hit++;
|
||||
ra->mmap_miss--;
|
||||
|
||||
/*
|
||||
* We have a locked page in the page cache, now we need to check
|
||||
|
|
|
|||
Loading…
Reference in a new issue