title: In new Linux kernel, what is a replacement for '.(in)active_list' fields from 'struct zone'?
body: <p>I keep receiving the following error message while compiling the code below. </p>
  
  <pre><code>mem_info/sys_mem_stats.c: In function ‘sys_memstats’:
  mem_info/sys_mem_stats.c:157: error: ‘struct zone’ has no member named ‘active_list’
  mem_info/sys_mem_stats.c:157: error: ‘struct zone’ has no member named ‘active_list’
  mem_info/sys_mem_stats.c:162: error: ‘struct zone’ has no member named ‘inactive_list’
  mem_info/sys_mem_stats.c:162: error: ‘struct zone’ has no member named ‘inactive_list’
  </code></pre>
  
  <hr>
  
  <pre><code>#include&lt;linux/linkage.h&gt;
  #include&lt;linux/kernel.h&gt;
  #include&lt;linux/memstats.h&gt;
  #include&lt;linux/sched.h&gt;
  #include&lt;asm/uaccess.h&gt;
  #include&lt;linux/mm.h&gt;
  #include&lt;linux/mmzone.h&gt;
  #include&lt;linux/vmstat.h&gt;
  #include&lt;linux/page-flags.h&gt;
  #include&lt;linux/timer.h&gt;
  #include&lt;linux/page-flags.h&gt;
  
  
  
  asmlinkage int sys_memstats(void){
  struct zone * zone;
  struct page * page; 
  
  long active_count = 0;
  long inactive_count = 0;
  long active_ref_bit_count = 0;
  long inactive_ref_bit_count = 0;
  
  struct list_head * pos1;
  struct list_head * pos2;
  
  for_each_zone(zone)
  {
    spin_lock_irq(&amp;zone-&gt;lru_lock);
    list_for_each(pos1, &amp;(zone-&gt;active_list)){
    active_count++;
    page = list_entry(pos1, struct page, lru);
    active_ref_bit_count += test_bit(PG_referenced, &amp;page-&gt;flags);
     }
  
    list_for_each(pos2, &amp;(zone-&gt;inactive_list)){
    inactive_count++;  // see zone-&gt;nr_inactive
    page = list_entry(pos2, struct page, lru);
    inactive_ref_bit_count += test_bit(PG_referenced, &amp;page-&gt;flags);
  }
  spin_unlock_irq(&amp;zone-&gt;lru_lock);
  }
  
  printk("1. active_count:           %lun", active_count);
  printk("2. inactive_count:         %lun", inactive_count);
  printk("3. active_ref_bit_count:   %lun", active_ref_bit_count);
  printk("4. inactive_ref_bit_count: %lun", inactive_ref_bit_count);
  printk("5. num_active_to_inactive: %lun", num_active_to_inactive);
  printk("6. num_inactive_to_free:   %lun", num_inactive_to_free);
  
  return 0;
  }
  </code></pre>