linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mmotm] memcg: fix argument for kunmap_atomic
@ 2008-11-17 15:27 Daisuke Nishimura, Daisuke Nishimura
  2008-11-18  1:16 ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 2+ messages in thread
From: Daisuke Nishimura, Daisuke Nishimura @ 2008-11-17 15:27 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, KAMEZAWA Hiroyuki, Balbir Singh, Pavel Emelianov,
	Hugh Dickins, Li Zefan, nishimura, d-nishimura

kunmap_atomic() should take kmapped address as argument.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
---
This patch is fix for memcg-swap-cgroup-for-remembering-usage.patch

 mm/page_cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index b0ea401..9c6ead1 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -350,7 +350,7 @@ struct mem_cgroup *swap_cgroup_record(swp_entry_t ent, struct mem_cgroup *mem)
 	sc += pos;
 	old = sc->val;
 	sc->val = mem;
-	kunmap_atomic(mappage, KM_USER0);
+	kunmap_atomic((void *)sc, KM_USER0);
 	spin_unlock_irqrestore(&ctrl->lock, flags);
 	return old;
 }
@@ -384,7 +384,7 @@ struct mem_cgroup *lookup_swap_cgroup(swp_entry_t ent)
 	sc = kmap_atomic(mappage, KM_USER0);
 	sc += pos;
 	ret = sc->val;
-	kunmap_atomic(mappage, KM_USER0);
+	kunmap_atomic((void *)sc, KM_USER0);
 	spin_unlock_irqrestore(&ctrl->lock, flags);
 	return ret;
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-18  1:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-17 15:27 [PATCH mmotm] memcg: fix argument for kunmap_atomic Daisuke Nishimura, Daisuke Nishimura
2008-11-18  1:16 ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox