Re: [PATCH mm-unstable] mm: move folio_set_compound_order() to mm/internal.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/14/22 7:44 PM, Muchun Song wrote:


On Dec 14, 2022, at 05:20, Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> wrote:

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@xxxxxxxxxx/T/
Fixes: 9fd330582b2f ("mm: add folio dtor and order setter functions")

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx>
Suggested-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Suggested-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Suggested-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Suggested-by: John Hubbard <jhubbard@xxxxxxxxxx>

Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Hi Muchun,

Does this review include the change from

+	if (!folio_test_large(folio)) {
+		WARN_ON_ONCE(order);
+		return;
+	}

to

if (WARN_ON_ONCE(!folio_test_large(folio)))
		return;

discussed in in this thread?

Thanks,
Sidhartha Kumar

Thanks.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux