]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slab.c
V4L/DVB (6797): bt8xx/ section fixes
[linux-2.6-omap-h63xx.git] / mm / slab.c
index c31cd3682a0b77ded3ac4e76cded3f427537a551..2e338a5f7b14c6d29216f4c54a74ef5259be01fa 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2881,6 +2881,8 @@ static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp,
        unsigned int objnr;
        struct slab *slabp;
 
+       BUG_ON(virt_to_cache(objp) != cachep);
+
        objp -= obj_offset(cachep);
        kfree_debugcheck(objp);
        page = virt_to_head_page(objp);
@@ -3759,8 +3761,6 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
 {
        unsigned long flags;
 
-       BUG_ON(virt_to_cache(objp) != cachep);
-
        local_irq_save(flags);
        debug_check_no_locks_freed(objp, obj_size(cachep));
        __cache_free(cachep, objp);
@@ -4475,3 +4475,4 @@ size_t ksize(const void *objp)
 
        return obj_size(virt_to_cache(objp));
 }
+EXPORT_SYMBOL(ksize);