It really makes no sense to have map_list structure embedded in the
pageframe list. All we need is a list_head that contains map_list
entries.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
struct maps_list *ml;
if (af->pid) {
- if (list_empty(&pf->ml.list)) {
+ if (list_empty(&pf->ml)) {
return;
}
- list_for_each_entry(ml, &pf->ml.list, list) {
+ list_for_each_entry(ml, &pf->ml, list) {
if (ml->map->pid == af->pid)
goto get_stats;
}
}
memset(&pf, 0, sizeof(pf));
- INIT_LIST_HEAD(&pf.ml.list);
+ INIT_LIST_HEAD(&pf.ml);
memset(&process_list, 0, sizeof(process_list));
INIT_LIST_HEAD(&process_list.list);
struct pageframe {
struct bintree tree;
- struct maps_list ml; /* List to mappings which point to this pfn */
+ struct list_head ml; /* List of mappings which refer to this pfn */
unsigned long long pf; /* page frame entry from /proc/pid/pagemap */
goto err;
clear_pageframe(pageframe);
- INIT_LIST_HEAD(&pageframe->ml.list);
+ INIT_LIST_HEAD(&pageframe->ml);
err:
return pageframe;
}
*/
tmp = alloc_maplist();
tmp->map = map;
- list_add(&tmp->list, &match->ml.list);
+ list_add(&tmp->list, &match->ml);
if (page_present(match))
map->pages_present++;