Commit d97d476b authored by Feng Tang's avatar Feng Tang Committed by Pekka Enberg

slab: Fix a typo in commit 8c138b "slab: Get rid of obj_size macro"

Commit  8c138b only sits in Pekka's and linux-next tree now, which tries
to replace obj_size(cachep) with cachep->object_size, but has a typo in
kmem_cache_free() by using "size" instead of "object_size", which casues
some regressions.
Reported-and-tested-by: default avatarFengguang Wu <wfg@linux.intel.com>
Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Cc: Christoph Lameter <cl@linux.com>
Acked-by: default avatarGlauber Costa <glommer@parallels.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 0672aa7c
...@@ -3890,7 +3890,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) ...@@ -3890,7 +3890,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
debug_check_no_locks_freed(objp, cachep->size); debug_check_no_locks_freed(objp, cachep->object_size);
if (!(cachep->flags & SLAB_DEBUG_OBJECTS)) if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
debug_check_no_obj_freed(objp, cachep->object_size); debug_check_no_obj_freed(objp, cachep->object_size);
__cache_free(cachep, objp, __builtin_return_address(0)); __cache_free(cachep, objp, __builtin_return_address(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment