Skip to content

Commit

Permalink
[PATCH] readahead: reset cache_hit earlier
Browse files Browse the repository at this point in the history
We don't reset the cache hit count until after readahead does a successful
readahead.  This seems to leave a corner case open where we miss in cache,
but don't restart the readhead right away.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Steven Pratt authored and Linus Torvalds committed Sep 7, 2005
1 parent e139aa5 commit 3b30bbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ void handle_ra_miss(struct address_space *mapping,
{
ra->flags |= RA_FLAG_MISS;
ra->flags &= ~RA_FLAG_INCACHE;
ra->cache_hit = 0;
}

/*
Expand Down

0 comments on commit 3b30bbd

Please sign in to comment.