From 2952f0d34d52bb68da9c1299f078a1dc9f9b2c7e Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 13 Dec 2024 19:44:18 +0100 Subject: [PATCH] Revert "bug on cache_from_obj !PageSlab check" This reverts commit c12b6fe5f1d958b9cee33c76993a282943361915. --- mm/slab.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/slab.h b/mm/slab.h index c17182db8..ad457ec12 100755 --- a/mm/slab.h +++ b/mm/slab.h @@ -478,13 +478,9 @@ static inline struct kmem_cache *virt_to_cache(const void *obj) struct page *page; page = virt_to_head_page(obj); -#ifdef CONFIG_BUG_ON_DATA_CORRUPTION - BUG_ON(!PageSlab(page)); -#else if (WARN_ONCE(!PageSlab(page), "%s: Object is not a Slab page!\n", __func__)) return NULL; -#endif return page->slab_cache; }