Zefan Li 50d53d7c72 memcg: fix memcg_kmem_bypass() for remote memcg charging
While trying to use remote memcg charging in an out-of-tree kernel
module I found it's not working, because the current thread is a
workqueue thread.

As we will probably encounter this issue in the future as the users of
memalloc_use_memcg() grow, and it's nothing wrong for this usage, it's
better we fix it now.

Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Link: http://lkml.kernel.org/r/1d202a12-26fe-0012-ea14-f025ddcd044a@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-02 10:59:09 -07:00
..
2020-04-10 15:36:21 -07:00
2020-04-07 10:43:41 -07:00
2020-04-08 21:03:40 -07:00
2020-02-04 03:05:25 +00:00
2020-04-07 10:43:41 -07:00
2020-04-07 10:43:38 -07:00
2020-04-10 15:36:21 -07:00
2020-04-10 15:36:21 -07:00
2020-04-08 21:03:40 -07:00
2020-04-10 15:36:21 -07:00
2020-04-10 15:36:21 -07:00
2020-03-21 18:56:06 -07:00
2020-04-07 10:43:38 -07:00
2019-09-17 15:20:17 -07:00
2020-04-07 10:43:41 -07:00