*remain in query_page_cache_segment() is over counted by 1, fix it.
Signed-off-by: Wu Fengguang <[email protected]>
---
--- linux-2.6.17-rc4-mm3.orig/mm/readahead.c
+++ linux-2.6.17-rc4-mm3/mm/readahead.c
@@ -1334,7 +1334,7 @@ static unsigned long query_page_cache_se
index = radix_tree_scan_hole_backward(&mapping->page_tree,
offset - 1, ra_max);
- *remain = offset - index;
+ *remain = (offset - 1) - index;
if (offset == ra->readahead_index && ra_cache_hit_ok(ra))
count = *remain;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]