projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e153362
)
slub: Remove useless checks in alloc_debug_processing
author
Christoph Lameter
<clameter@sgi.com>
Sat, 16 Feb 2008 07:45:24 +0000
(23:45 -0800)
committer
Christoph Lameter
<clameter@sgi.com>
Mon, 3 Mar 2008 20:22:31 +0000
(12:22 -0800)
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>
mm/slub.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/slub.c
b/mm/slub.c
index d7d0d866b6b2e4df8c40a6c866ddfff8cebfdcd7..0a5a1001590ba67b610cc755cfdda08e3cbf6572 100644
(file)
--- a/
mm/slub.c
+++ b/
mm/slub.c
@@
-852,7
+852,7
@@
static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
if (!check_slab(s, page))
goto bad;
- if (
object &&
!on_freelist(s, page, object)) {
+ if (!on_freelist(s, page, object)) {
object_err(s, page, object, "Object already allocated");
goto bad;
}
@@
-862,7
+862,7
@@
static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
goto bad;
}
- if (
object &&
!check_object(s, page, object, 0))
+ if (!check_object(s, page, object, 0))
goto bad;
/* Success perform special debug activities for allocs */