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.14-rc1~703 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3b30bbd963ac2606b0377b39c9d148d6eeef7dce;p=linux-2.6-omap-h63xx.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 b840e7c6ea7..d0b50034e24 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; } /*