mm: don't include <linux/memremap.h> in <linux/mm.h>
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Feb 2022 04:31:36 +0000 (15:31 +1100)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 17 Feb 2022 22:05:42 +0000 (17:05 -0500)
commit96160c2f78bd15b2977417fbce520386aaf80f2f
tree12410981f780802ad65c015e5783b0b20dc049b2
parentf8d3639bc6d701d8c50498786b267d003beb6998
mm: don't include <linux/memremap.h> in <linux/mm.h>

Move the check for the actual pgmap types that need the free at refcount
one behavior into the out of line helper, and thus avoid the need to
pull memremap.h into mm.h.

Link: https://lkml.kernel.org/r/20220210072828.2930359-7-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: "Sierra Guiza, Alejandro (Alex)" <alex.sierra@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
18 files changed:
arch/arm64/mm/mmu.c
arch/powerpc/kvm/book3s_hv_uvmem.c
arch/powerpc/mm/book3s64/pgtable.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/drm_cache.c
drivers/gpu/drm/nouveau/nouveau_dmem.c
drivers/gpu/drm/nouveau/nouveau_svm.c
drivers/infiniband/core/rw.c
drivers/nvdimm/pmem.h
drivers/nvme/host/pci.c
drivers/nvme/target/io-cmd-bdev.c
fs/fuse/virtio_fs.c
fs/proc/page.c
include/linux/memremap.h
include/linux/mm.h
lib/test_hmm.c
mm/memcontrol.c
mm/memremap.c