Files
kernel/include/linux
Johannes Weiner 6eeb104e11 fs: buffer: use raw page_memcg() on locked page
alloc_page_buffers() currently uses get_mem_cgroup_from_page() for
charging the buffers to the page owner, which does an rcu-protected
page->memcg lookup and acquires a reference.  But buffer allocation has
the page lock held throughout, which pins the page to the memcg and
thereby the memcg - neither rcu nor holding an extra reference during the
allocation are necessary.  Use a raw page_memcg() instead.

This was the last user of get_mem_cgroup_from_page(), delete it.

Link: https://lkml.kernel.org/r/20210209190126.97842-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-24 13:38:30 -08:00
..
2021-02-02 00:16:57 +01:00
2021-01-23 14:57:21 +01:00
2021-01-24 14:27:17 +01:00
2021-02-17 14:07:48 +01:00
2020-12-19 11:18:38 -08:00
2021-01-21 14:06:00 -07:00
2021-01-06 16:24:59 -08:00
2021-01-16 15:12:06 -05:00
2021-01-18 14:26:51 +01:00
2021-02-08 12:28:07 +01:00
2021-02-11 13:24:44 -08:00
2021-01-14 08:21:09 -08:00
2021-01-27 12:27:36 +01:00
2021-01-18 16:13:51 +01:00
2021-02-17 14:12:42 +01:00
2021-01-21 16:16:10 +00:00
2021-02-11 10:51:56 +00:00
2021-01-22 15:09:42 +01:00
2021-01-14 11:20:17 +01:00
2021-02-08 12:28:07 +01:00
2021-01-24 14:43:45 +01:00
2021-01-04 11:42:21 -05:00
2021-01-24 14:27:20 +01:00
2021-02-02 10:26:12 +01:00
2021-02-17 13:17:49 -08:00
2021-01-21 14:06:00 -07:00
2021-02-03 19:05:50 +01:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:20 +01:00
2021-01-16 23:19:26 +01:00
2021-01-28 00:35:03 +01:00
2021-01-06 16:24:59 -08:00
2021-02-09 12:27:29 -05:00
2021-02-13 17:17:53 +01:00
2021-01-21 16:16:10 +00:00
2021-01-18 10:52:41 +01:00
2021-01-21 14:06:00 -07:00
2021-01-24 14:27:17 +01:00
2021-02-08 22:58:55 +01:00