projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c14f35c
)
memcg: remove NULL check from lookup_page_cgroup() result
author
Johannes Weiner
<
[email protected]
>
Wed, 23 Mar 2011 23:42:24 +0000
(16:42 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 24 Mar 2011 02:46:25 +0000
(19:46 -0700)
The page_cgroup array is set up before even fork is initialized. I
seriously doubt that this code executes before the array is alloc'd.
Signed-off-by: Johannes Weiner <
[email protected]
>
Acked-by: KAMEZAWA Hiroyuki <
[email protected]
>
Cc: Daisuke Nishimura <
[email protected]
>
Cc: Balbir Singh <
[email protected]
>
Cc: Minchan Kim <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/memcontrol.c
patch
|
blob
|
history
diff --git
a/mm/memcontrol.c
b/mm/memcontrol.c
index b94cd24c5baaac4941e3f393bdd64f38ef8f9f87..3a2d54bdf0760526f408c866d560fe083bc6fc89 100644
(file)
--- a/
mm/memcontrol.c
+++ b/
mm/memcontrol.c
@@
-2369,10
+2369,7
@@
static int mem_cgroup_charge_common(struct page *page, struct mm_struct *mm,
}
pc = lookup_page_cgroup(page);
- /* can happen at boot */
- if (unlikely(!pc))
- return 0;
- prefetchw(pc);
+ BUG_ON(!pc); /* XXX: remove this and move pc lookup into commit */
ret = __mem_cgroup_try_charge(mm, gfp_mask, &mem, oom, page_size);
if (ret || !mem)