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:
7a0524c
)
mm: memcg: remove unneeded checks from uncharge_page()
author
Johannes Weiner
<
[email protected]
>
Fri, 13 Jan 2012 01:18:45 +0000
(17:18 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 13 Jan 2012 04:13:06 +0000
(20:13 -0800)
mem_cgroup_uncharge_page() is only called on either freshly allocated
pages without page->mapping or on rmapped PageAnon() pages. There is no
need to check for a page->mapping that is not an anon_vma.
Signed-off-by: Johannes Weiner <
[email protected]
>
Acked-by: KAMEZAWA Hiroyuki <
[email protected]
>
Acked-by: Michal Hocko <
[email protected]
>
Cc: Balbir Singh <
[email protected]
>
Cc: David Rientjes <
[email protected]
>
Cc: Hugh Dickins <
[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 2450d89486d40e90226cede9dd790fb1e23b389a..71a9774e6ead9af2ac084161dc06edcfd77b2b61 100644
(file)
--- a/
mm/memcontrol.c
+++ b/
mm/memcontrol.c
@@
-3061,8
+3061,7
@@
void mem_cgroup_uncharge_page(struct page *page)
/* early check. */
if (page_mapped(page))
return;
- if (page->mapping && !PageAnon(page))
- return;
+ VM_BUG_ON(page->mapping && !PageAnon(page));
__mem_cgroup_uncharge_common(page, MEM_CGROUP_CHARGE_TYPE_MAPPED);
}