From 9462763bbb53df0a5ca040d9e9b01e75cf6779cd Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 13 Sep 2001 11:07:08 +0000 Subject: [PATCH] o Use kmem_cache_destroy() to remove slab cache. --- driver/device-mapper/dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/driver/device-mapper/dm.c b/driver/device-mapper/dm.c index 75fcf6f8b..303c6eb07 100644 --- a/driver/device-mapper/dm.c +++ b/driver/device-mapper/dm.c @@ -77,8 +77,7 @@ static int dm_init(void) init_rwsem(&_dev_lock); - if (!_io_hook_cache && - !(_io_hook_cache = + if (!(_io_hook_cache = kmem_cache_create("dm io hooks", sizeof(struct io_hook), 0, 0, NULL, NULL))) return -ENOMEM; @@ -109,7 +108,7 @@ static int dm_init(void) static void dm_exit(void) { - if(kmem_cache_shrink(_io_hook_cache)) + if(kmem_cache_destroy(_io_hook_cache)) WARN("it looks like there are still some io_hooks allocated"); dm_fs_exit();