summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c4
-rw-r--r--mm/slob.c4
-rw-r--r--mm/slub.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/mm/slab.c b/mm/slab.c
index fa00fd6a644d..b58400285030 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3773,6 +3773,8 @@ void kfree(const void *objp)
struct kmem_cache *c;
unsigned long flags;
+ trace_kfree(_RET_IP_, objp);
+
if (unlikely(ZERO_OR_NULL_PTR(objp)))
return;
local_irq_save(flags);
@@ -3782,8 +3784,6 @@ void kfree(const void *objp)
debug_check_no_obj_freed(objp, obj_size(c));
__cache_free(c, (void *)objp);
local_irq_restore(flags);
-
- trace_kfree(_RET_IP_, objp);
}
EXPORT_SYMBOL(kfree);
diff --git a/mm/slob.c b/mm/slob.c
index 00003587ebfa..a2d4ab32198d 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -514,6 +514,8 @@ void kfree(const void *block)
{
struct slob_page *sp;
+ trace_kfree(_RET_IP_, block);
+
if (unlikely(ZERO_OR_NULL_PTR(block)))
return;
@@ -524,8 +526,6 @@ void kfree(const void *block)
slob_free(m, *m + align);
} else
put_page(&sp->page);
-
- trace_kfree(_RET_IP_, block);
}
EXPORT_SYMBOL(kfree);
diff --git a/mm/slub.c b/mm/slub.c
index a98078bf738b..7ab54ecbd3f3 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2792,6 +2792,8 @@ void kfree(const void *x)
struct page *page;
void *object = (void *)x;
+ trace_kfree(_RET_IP_, x);
+
if (unlikely(ZERO_OR_NULL_PTR(x)))
return;
@@ -2802,8 +2804,6 @@ void kfree(const void *x)
return;
}
slab_free(page->slab, page, object, _RET_IP_);
-
- trace_kfree(_RET_IP_, x);
}
EXPORT_SYMBOL(kfree);