From 0bb7ba6b9c358c12084a3cbc6ac08c8d1e973937 Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Tue, 16 Oct 2007 01:24:32 -0700 Subject: 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 Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/filemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mm/filemap.c') diff --git a/mm/filemap.c b/mm/filemap.c index 15c8413ee92..5dc18d76e70 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -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 -- cgit v1.2.3