Revert "bug on !PageSlab && !PageCompound in ksize"

This reverts commit 0fc6163cd6.
This commit is contained in:
Ksawlii 2024-12-13 19:44:18 +01:00
parent e2bbab2d22
commit e1a9aa973c

View file

@ -4369,11 +4369,7 @@ size_t __ksize(const void *object)
page = virt_to_head_page(object); page = virt_to_head_page(object);
if (unlikely(!PageSlab(page))) { if (unlikely(!PageSlab(page))) {
#ifdef CONFIG_BUG_ON_DATA_CORRUPTION
BUG_ON(!PageCompound(page));
#else
WARN_ON(!PageCompound(page)); WARN_ON(!PageCompound(page));
#endif
return page_size(page); return page_size(page);
} }