slub: Remove useless checks in alloc_debug_processing
Alloc debug processing is never called with a NULL object pointer. No reason to check for NULL. Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Christoph Lameter <clameter@sgi.com>
This commit is contained in:
@@ -852,7 +852,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
|
|||||||
if (!check_slab(s, page))
|
if (!check_slab(s, page))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
if (object && !on_freelist(s, page, object)) {
|
if (!on_freelist(s, page, object)) {
|
||||||
object_err(s, page, object, "Object already allocated");
|
object_err(s, page, object, "Object already allocated");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
@@ -862,7 +862,7 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object && !check_object(s, page, object, 0))
|
if (!check_object(s, page, object, 0))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
/* Success perform special debug activities for allocs */
|
/* Success perform special debug activities for allocs */
|
||||||
|
Reference in New Issue
Block a user