[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20080520153525.5b21b89c.kamezawa.hiroyu@jp.fujitsu.com>
Date: Tue, 20 May 2008 15:35:25 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, balbir@...ibm.com,
ebiederm@...ssion.com, hugh@...itas.com, lizf@...fujitsu.com,
menage@...gle.com, rientjes@...gle.com, xemul@...nvz.org,
yamamoto@...inux.co.jp
Subject: Re: + memcg-remove-refcnt-from-page_cgroup.patch added to -mm tree
hi, I found a bug in this patch. (A fix is attached below.)
On Thu, 15 May 2008 19:53:17 -0700
akpm@...ux-foundation.org wrote:
> +/* remove redundant charge if migration failed*/
> void mem_cgroup_end_migration(struct page *newpage)
> {
> - mem_cgroup_uncharge_page(newpage);
> + /* At success, page->mapping is not NULL */
> + if (newpage->mapping)
> + __mem_cgroup_uncharge_common(newpage,
> + MEM_CGROUP_CHARGE_TYPE_FORCE);
> }
>
Should be if (!newpage->mapping). Maybe a typo in restructuring...
Sorry.
-Kame
==
This rollback should be done at failure.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mm-2.6.26-rc2-mm1/mm/memcontrol.c
===================================================================
--- mm-2.6.26-rc2-mm1.orig/mm/memcontrol.c
+++ mm-2.6.26-rc2-mm1/mm/memcontrol.c
@@ -760,8 +760,8 @@ int mem_cgroup_prepare_migration(struct
/* remove redundant charge if migration failed*/
void mem_cgroup_end_migration(struct page *newpage)
{
- /* At success, page->mapping is not NULL */
- if (newpage->mapping)
+ /* At success, page->mapping is not NULL and nothing to do. */
+ if (!newpage->mapping)
__mem_cgroup_uncharge_common(newpage,
MEM_CGROUP_CHARGE_TYPE_FORCE);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists