diff options
author | Christoph Lameter <cl@linux.com> | 2013-09-04 12:35:35 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2013-09-04 13:53:16 -0400 |
commit | 76b6f3d255a327383c89cb8c8384872dd4a0a054 (patch) | |
tree | 03392369b95fd5111bc3f13f1cab26bb622249eb /mm | |
parent | f1b6eb6e6be149b40ebb013f5bfe2ac86b6f1c1b (diff) |
slub: remove verify_mem_not_deleted()
I do not see any user for this code in the tree.
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 37 |
1 files changed, 0 insertions, 37 deletions
@@ -3326,43 +3326,6 @@ size_t ksize(const void *object) | |||
3326 | } | 3326 | } |
3327 | EXPORT_SYMBOL(ksize); | 3327 | EXPORT_SYMBOL(ksize); |
3328 | 3328 | ||
3329 | #ifdef CONFIG_SLUB_DEBUG | ||
3330 | bool verify_mem_not_deleted(const void *x) | ||
3331 | { | ||
3332 | struct page *page; | ||
3333 | void *object = (void *)x; | ||
3334 | unsigned long flags; | ||
3335 | bool rv; | ||
3336 | |||
3337 | if (unlikely(ZERO_OR_NULL_PTR(x))) | ||
3338 | return false; | ||
3339 | |||
3340 | local_irq_save(flags); | ||
3341 | |||
3342 | page = virt_to_head_page(x); | ||
3343 | if (unlikely(!PageSlab(page))) { | ||
3344 | /* maybe it was from stack? */ | ||
3345 | rv = true; | ||
3346 | goto out_unlock; | ||
3347 | } | ||
3348 | |||
3349 | slab_lock(page); | ||
3350 | if (on_freelist(page->slab_cache, page, object)) { | ||
3351 | object_err(page->slab_cache, page, object, | ||
3352 | "Object is on free-list"); | ||
3353 | rv = false; | ||
3354 | } else { | ||
3355 | rv = true; | ||
3356 | } | ||
3357 | slab_unlock(page); | ||
3358 | |||
3359 | out_unlock: | ||
3360 | local_irq_restore(flags); | ||
3361 | return rv; | ||
3362 | } | ||
3363 | EXPORT_SYMBOL(verify_mem_not_deleted); | ||
3364 | #endif | ||
3365 | |||
3366 | void kfree(const void *x) | 3329 | void kfree(const void *x) |
3367 | { | 3330 | { |
3368 | struct page *page; | 3331 | struct page *page; |