memcg: remove impossible conditional when committing
Subsystems (2)
Johannes Weiner
maintainerPATCH 1/1 memcg: remove impossible conditional when committing
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]>
--- mm/memcontrol.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
mm/memcontrol.c +0 -4
@@ -2092,10 +2092,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);
Signature · 8 lines
1.7.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · On Thu, 3 Feb 2011 15:11:10 +0100 Johannes Weiner <[email protected]> wrote:
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]>
But, could you add VM_BUG_ON(!mem) here ?
Thanks,
-Kame
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>