Commit f4930de0 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Vlastimil Babka
Browse files

slab: Remove dead code in free_consistency_checks()



We already know that slab is a valid slab as that's checked by the
caller.  In the future, we won't be able to get to a slab pointer
from a non-slab page.

Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 41534d49
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1684,10 +1684,7 @@ static inline int free_consistency_checks(struct kmem_cache *s,
		return 0;

	if (unlikely(s != slab->slab_cache)) {
		if (!folio_test_slab(slab_folio(slab))) {
			slab_err(s, slab, "Attempt to free object(0x%p) outside of slab",
				 object);
		} else if (!slab->slab_cache) {
		if (!slab->slab_cache) {
			slab_err(NULL, slab, "No slab cache for object 0x%p",
				 object);
		} else {