]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/readahead.c
[PATCH] Drop __get_zone_counts()
[net-next-2.6.git] / mm / readahead.c
index 0f539e8e827a7a1b0956c30d30ea89434b02bc26..93d9ee692fd8b193b12ba207f69f900c831e404d 100644 (file)
@@ -575,10 +575,6 @@ void handle_ra_miss(struct address_space *mapping,
  */
 unsigned long max_sane_readahead(unsigned long nr)
 {
-       unsigned long active;
-       unsigned long inactive;
-       unsigned long free;
-
-       __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
-       return min(nr, (inactive + free) / 2);
+       return min(nr, (node_page_state(numa_node_id(), NR_INACTIVE)
+               + node_page_state(numa_node_id(), NR_FREE_PAGES)) / 2);
 }