memcg: remove warning when CONFIG_DEBUG_VM=n
authorKAMEZAWA Hiroyuki <[email protected]>
Mon, 13 Apr 2009 21:40:08 +0000 (14:40 -0700)
committerLinus Torvalds <[email protected]>
Mon, 13 Apr 2009 22:04:32 +0000 (15:04 -0700)
mm/memcontrol.c:318: warning: `mem_cgroup_is_obsolete' defined but not used

[[email protected]: simplify as suggested by Balbir]
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Balbir Singh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c

index 2fc6d6c482387ed35a735746bf4580d3d38e68da..e44fb0fbb80e0890923385d3e97aff8dfa9d9a1b 100644 (file)
@@ -932,7 +932,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm,
        if (unlikely(!mem))
                return 0;
 
-       VM_BUG_ON(mem_cgroup_is_obsolete(mem));
+       VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem));
 
        while (1) {
                int ret;