浏览代码

[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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Steven Pratt 19 年之前
父节点
当前提交
3b30bbd963
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      mm/readahead.c

+ 1 - 0
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;
 }
 
 /*