hugetlb: no need to drop hugetlb_lock to call cma_release
Now that cma_release is non-blocking and irq safe, there is no need to drop hugetlb_lock before calling. Link: https://lkml.kernel.org/r/20210409205254.242291-3-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Roman Gushchin <guro@fb.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Reviewed-by: David Hildenbrand <david@redhat.com> Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com> Cc: Barry Song <song.bao.hua@hisilicon.com> Cc: David Rientjes <rientjes@google.com> Cc: Hillf Danton <hdanton@sina.com> Cc: HORIGUCHI NAOYA <naoya.horiguchi@nec.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Mina Almasry <almasrymina@google.com> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Peter Xu <peterx@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shakeel Butt <shakeelb@google.com> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0ef7dcac99
commit
262443c042
@ -1355,14 +1355,8 @@ static void update_and_free_page(struct hstate *h, struct page *page)
|
||||
set_compound_page_dtor(page, NULL_COMPOUND_DTOR);
|
||||
set_page_refcounted(page);
|
||||
if (hstate_is_gigantic(h)) {
|
||||
/*
|
||||
* Temporarily drop the hugetlb_lock, because
|
||||
* we might block in free_gigantic_page().
|
||||
*/
|
||||
spin_unlock(&hugetlb_lock);
|
||||
destroy_compound_gigantic_page(page, huge_page_order(h));
|
||||
free_gigantic_page(page, huge_page_order(h));
|
||||
spin_lock(&hugetlb_lock);
|
||||
} else {
|
||||
__free_pages(page, huge_page_order(h));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user