Messages in this thread Patch in this message | | | Date | Thu, 3 Feb 2011 15:11:10 +0100 | From | Johannes Weiner <> | Subject | [patch] 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 <hannes@cmpxchg.org> --- mm/memcontrol.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 031ff07..a145c9e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -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); -- 1.7.4
| |