lkml.org 
[lkml]   [2012]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH next] memcg: remove PCG_FILE_MAPPED fix cosmetic fix
On Tue, 28 Feb 2012 21:28:40 -0800 (PST)
Hugh Dickins <hughd@google.com> wrote:

> mem_cgroup_move_account() begins with "anon = PageAnon(page)", and
> then anon is used thereafter: testing PageAnon(page) in the middle
> makes the reader wonder if there's some race to guard against - no.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>

Thanks.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

> ---
>
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 3.3-rc5-next/mm/memcontrol.c 2012-02-27 09:56:59.072001463 -0800
> +++ linux/mm/memcontrol.c 2012-02-28 20:45:43.488100423 -0800
> @@ -2560,7 +2560,7 @@ static int mem_cgroup_move_account(struc
>
> move_lock_mem_cgroup(from, &flags);
>
> - if (!PageAnon(page) && page_mapped(page)) {
> + if (!anon && page_mapped(page)) {
> /* Update mapped_file data for mem_cgroup */
> preempt_disable();
> __this_cpu_dec(from->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]);
>



\
 
 \ /
  Last update: 2012-02-29 06:45    [W:0.191 / U:0.860 seconds]
©2003-2014 Jasper Spaans. Advertise on this site