From: Steven Pratt Date: Tue, 6 Sep 2005 22:17:06 +0000 (-0700) Subject: [PATCH] readahead: reset cache_hit earlier X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b30bbd963ac2606b0377b39c9d148d6eeef7dce;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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; } /*