summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2009-03-06 16:36:21 +0100
committerPekka Enberg <penberg@cs.helsinki.fi>2009-03-23 08:43:52 +0100
commit1a00df4a2cc001dd9f45890e690548c24b2fa2d9 (patch)
tree40137bca1657f6a9e9e10ff004d8ec6b3d6b39f2 /mm/slub.c
parentSLUB: Use ->objsize from struct kmem_cache_cpu in slab_free() (diff)
downloadlinux-1a00df4a2cc001dd9f45890e690548c24b2fa2d9.tar.xz
linux-1a00df4a2cc001dd9f45890e690548c24b2fa2d9.zip
slub: use get_track()
Use get_track() in set_track() Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/slub.c b/mm/slub.c
index f21e25ad453b..e150b5c0424f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -374,14 +374,8 @@ static struct track *get_track(struct kmem_cache *s, void *object,
static void set_track(struct kmem_cache *s, void *object,
enum track_item alloc, unsigned long addr)
{
- struct track *p;
-
- if (s->offset)
- p = object + s->offset + sizeof(void *);
- else
- p = object + s->inuse;
+ struct track *p = get_track(s, object, alloc);
- p += alloc;
if (addr) {
p->addr = addr;
p->cpu = smp_processor_id();