]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] static list init page_alloc.c
authorWilliam Lee Irwin III <wli@holomorphy.com>
Mon, 3 Jun 2002 05:34:40 +0000 (22:34 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 3 Jun 2002 05:34:40 +0000 (22:34 -0700)
  inactive_list and active_list are global, yet they are repeatedly
  initialized using INIT_LIST_HEAD() in free_area_init_core(). This
  patch is originally due to Christoph Hellwig, and by some reports
  has been implementated before in 2.4-based trees by Andrea Arcangeli.

mm/page_alloc.c

index c29f89c249052a2571ca7039e7dd35ef229681a0..fbf082a66cff250c7a36cca910ed71a7648fbed0 100644 (file)
@@ -27,8 +27,8 @@
 unsigned long totalram_pages;
 unsigned long totalhigh_pages;
 int nr_swap_pages;
-struct list_head inactive_list;
-struct list_head active_list;
+LIST_HEAD(active_list);
+LIST_HEAD(inactive_list);
 pg_data_t *pgdat_list;
 
 /*
@@ -810,9 +810,6 @@ void __init free_area_init_core(int nid, pg_data_t *pgdat, struct page **gmap,
                        
        printk("On node %d totalpages: %lu\n", nid, realtotalpages);
 
-       INIT_LIST_HEAD(&active_list);
-       INIT_LIST_HEAD(&inactive_list);
-
        /*
         * Some architectures (with lots of mem and discontinous memory
         * maps) have to search for a good mem_map area: