memcg: remove warning when CONFIG_DEBUG_VM=n
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Mon, 13 Apr 2009 21:40:08 +0000 (14:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Apr 2009 22:04:32 +0000 (15:04 -0700)
mm/memcontrol.c:318: warning: `mem_cgroup_is_obsolete' defined but not used

[akpm@linux-foundation.org: simplify as suggested by Balbir]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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;