slub: current is always valid

Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
Alexey Dobriyan 2008-06-23 02:58:37 +04:00 committed by Pekka Enberg
parent 0937502af7
commit 88e4ccf294

View file

@ -411,7 +411,7 @@ static void set_track(struct kmem_cache *s, void *object,
if (addr) {
p->addr = addr;
p->cpu = smp_processor_id();
p->pid = current ? current->pid : -1;
p->pid = current->pid;
p->when = jiffies;
} else
memset(p, 0, sizeof(struct track));