Vladimir Davydov 4e701d7b37 memcg: only check memcg_kmem_skip_account in __memcg_kmem_get_cache
__memcg_kmem_get_cache can recurse if it calls kmalloc (which it does if
the cgroup's kmem cache doesn't exist), because kmalloc may call
__memcg_kmem_get_cache internally again.  To avoid the recursion, we use
the task_struct->memcg_kmem_skip_account flag.

However, there's no need checking the flag in memcg_kmem_newpage_charge,
because there's no way how this function could result in recursion, if
called from memcg_kmem_get_cache.  So let's remove the redundant code.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-13 12:42:47 -08:00
..
2012-01-03 22:54:56 -05:00
2014-12-13 12:42:45 -08:00
2014-12-13 12:42:45 -08:00
2014-12-13 12:42:45 -08:00
2011-07-26 16:49:47 -07:00
2014-12-08 20:25:23 -05:00
2014-10-09 22:26:00 -04:00
2014-12-13 12:42:46 -08:00
2014-01-27 21:02:39 -08:00
2014-12-13 12:42:45 -08:00
2014-09-24 14:07:58 +02:00
2014-12-13 12:42:45 -08:00
2014-12-13 12:42:46 -08:00
2014-10-09 22:25:58 -04:00
2014-10-29 10:34:34 -04:00
2014-10-24 00:14:37 +02:00
2014-10-09 22:26:02 -04:00
2014-08-29 16:28:16 -07:00