diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2020-06-04 02:01:09 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-04 06:09:47 +0300 |
commit | ff45fc3ca0f3c38e752d75f71b8d8efcf409e42d (patch) | |
tree | 0292da2a5339e202658028ead79cf4f2bb791749 /mm/swap.c | |
parent | 5be993432821750f382809df5e20bf4c129b24f7 (diff) | |
download | linux-ff45fc3ca0f3c38e752d75f71b8d8efcf409e42d.tar.xz |
mm: simplify calling a compound page destructor
None of the three callers of get_compound_page_dtor() want to know the
value; they just want to call the function. Replace it with
destroy_compound_page() which calls the dtor for them.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: http://lkml.kernel.org/r/20200517105051.9352-1-willy@infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/swap.c b/mm/swap.c index 0ac463d44cff..6e454a5c5ab9 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -102,8 +102,6 @@ static void __put_single_page(struct page *page) static void __put_compound_page(struct page *page) { - compound_page_dtor *dtor; - /* * __page_cache_release() is supposed to be called for thp, not for * hugetlb. This is because hugetlb page does never have PageLRU set @@ -112,8 +110,7 @@ static void __put_compound_page(struct page *page) */ if (!PageHuge(page)) __page_cache_release(page); - dtor = get_compound_page_dtor(page); - (*dtor)(page); + destroy_compound_page(page); } void __put_page(struct page *page) |