mm: hugetlb_vmemmap: move mmap lock to vmemmap_remap_range()
authorMuchun Song <songmuchun@bytedance.com>
Tue, 5 Dec 2023 03:08:53 +0000 (11:08 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Dec 2023 18:57:08 +0000 (10:57 -0800)
commit49b960de6b323c34a79e6e92219fac31b12268a3
tree439bac0a7835f7ef66e1b7e5e42e9d086d1b35bd
parent47e61d8874cca8070d4f9295819876c18b5207b2
mm: hugetlb_vmemmap: move mmap lock to vmemmap_remap_range()

All the users of vmemmap_remap_range() will hold the mmap lock and release
it once it returns, it is naturally to move the lock to
vmemmap_remap_range() to simplify the code and the users.

Link: https://lkml.kernel.org/r/20231205030853.3921-1-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_vmemmap.c