Skip to content
Commit 04a42e72 authored by Sidhartha Kumar's avatar Sidhartha Kumar Committed by Andrew Morton
Browse files

mm: move folio_set_compound_order() to mm/internal.h

folio_set_compound_order() is moved to an mm-internal location so external
folio users cannot misuse this function.  Change the name of the function
to folio_set_order() and use WARN_ON_ONCE() rather than BUG_ON.  Also,
handle the case if a non-large folio is passed and add clarifying comments
to the function.

Link: https://lore.kernel.org/lkml/20221207223731.32784-1-sidhartha.kumar@oracle.com/T/
Link: https://lkml.kernel.org/r/20221215061757.223440-1-sidhartha.kumar@oracle.com


Fixes: 9fd33058 ("mm: add folio dtor and order setter functions")
Signed-off-by: default avatarSidhartha Kumar <sidhartha.kumar@oracle.com>
Suggested-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Suggested-by: default avatarMuchun Song <songmuchun@bytedance.com>
Suggested-by: default avatarMatthew Wilcox <willy@infradead.org>
Suggested-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 1301f931
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment