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:
3403968
)
memcg: remove impossible conditional when committing
author
Johannes Weiner
<
[email protected]
>
Wed, 23 Mar 2011 23:42:23 +0000
(16:42 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 24 Mar 2011 02:46:24 +0000
(19:46 -0700)
No callsite ever passes a NULL pointer for a struct mem_cgroup * to the
committing function. There is no need to check for it.
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 0595e2b184a20260a71861e6d2cc51077e579b25..b94cd24c5baaac4941e3f393bdd64f38ef8f9f87 100644
(file)
--- a/
mm/memcontrol.c
+++ b/
mm/memcontrol.c
@@
-2118,10
+2118,6
@@
static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
{
int nr_pages = page_size >> PAGE_SHIFT;
- /* try_charge() can return NULL to *memcg, taking care of it. */
- if (!mem)
- return;
-
lock_page_cgroup(pc);
if (unlikely(PageCgroupUsed(pc))) {
unlock_page_cgroup(pc);