linux/include
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
..
acpi IOMMU Updates for Linux v5.12 2021-02-22 10:31:29 -08:00
asm-generic Modules updates for v5.12 2021-02-23 10:15:33 -08:00
clocksource
crypto Keyrings miscellany 2021-02-23 16:09:23 -08:00
drm
dt-bindings Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2021-02-23 14:56:23 -08:00
keys
kunit
kvm
linux fs: buffer: use raw page_memcg() on locked page 2021-02-24 13:38:30 -08:00
math-emu
media Fixes around VM_FPNMAP and follow_pfn 2021-02-22 17:45:02 -08:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2021-02-17 13:19:24 -08:00
pcmcia
ras
rdma RDMA/ipoib: Remove racy Subnet Manager sendonly join checks 2021-02-16 14:42:58 -04:00
scsi
soc IOMMU Updates for Linux v5.12 2021-02-22 10:31:29 -08:00
sound ASoC: Updates for v5.12 2021-02-17 21:16:27 +01:00
target
trace mm, tracing: record slab name for kmem_cache_free() 2021-02-24 13:38:26 -08:00
uapi Changes in gfs2: 2021-02-23 14:04:04 -08:00
vdso
video
xen x86: 2021-02-21 13:31:43 -08:00