On Sat, 18 Feb 2012 22:43:58 +0800 Hillf Danton <dhillf@xxxxxxxxx> wrote: > On Sat, Feb 18, 2012 at 9:39 PM, Johannes Weiner <hannes@xxxxxxxxxxx> wrote: > > On Fri, Feb 17, 2012 at 06:28:18PM +0900, KAMEZAWA Hiroyuki wrote: > >> @@ -2559,7 +2555,7 @@ static int mem_cgroup_move_account(struct page *page, > >> > >> move_lock_mem_cgroup(from, &flags); > >> > >> - if (PageCgroupFileMapped(pc)) { > >> + if (page_mapped(page)) { > > > > As opposed to update_page_stat(), this runs against all types of > > pages, so I think it should be > > > > if (!PageAnon(page) && page_mapped(page)) > > > > instead. > > > Perhaps the following helper or similar needed, > along with page_mapped() > > static inline bool page_is_file_mapping(struct page *page) > { > struct address_space *mapping = page_mapping(page); > > return mapping && mapping != &swapper_space && > ((unsigned long)mapping & PAGE_MAPPING_FLAGS) == 0; > } > Ah, thank you. I'll post a fix soon. Ragard, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>