]> err.no Git - linux-2.6/commitdiff
[PATCH] readahead: reset cache_hit earlier
authorSteven Pratt <slpratt@austin.ibm.com>
Tue, 6 Sep 2005 22:17:06 +0000 (15:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:25 +0000 (16:57 -0700)
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>
mm/readahead.c

index b840e7c6ea740433d1851c379705efe191259e1d..d0b50034e245a0095c7d359388b59676af0bdb59 100644 (file)
@@ -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;
 }
 
 /*