From: Steven Pratt Date: Tue, 6 Sep 2005 22:17:06 +0000 (-0700) Subject: [PATCH] readahead: reset cache_hit earlier X-Git-Tag: v2.6.16.28-rc1~4480 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3b30bbd963ac2606b0377b39c9d148d6eeef7dce;p=karo-tx-linux.git [PATCH] readahead: reset cache_hit earlier 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 Signed-off-by: Linus Torvalds --- diff --git a/mm/readahead.c b/mm/readahead.c index b840e7c6ea74..d0b50034e245 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -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; } /*