Comment 4 for bug 105552

Revision history for this message
quendi (quendi) wrote :

i had the same problem (void value not ignored) with feisty and drbd 7.21 and fixed it with the following patch:
http://lists.linbit.com/pipermail/drbd-user/2006-November/005918.html

void drbd_destroy_mempools(void)
{
        if (drbd_request_mempool)
                mempool_destroy(drbd_request_mempool);
        if (drbd_ee_cache)
                kmem_cache_destroy(drbd_ee_cache);
        /* Above code changed from the following function for compatibility
        / with mm3 patches to kernel 2.6.18:
        /
        / if (drbd_ee_cache) && kmem_cache_destroy(drbd_ee_cache))
        / printk(KERN_ERR DEVICE_NAME
        / ": kmem_cache_destroy(drbd_ee_cache) FAILED\n");
        */
        if (drbd_request_cache)
                kmem_cache_destroy(drbd_request_cache);

        /* Above code changed from the following function for compatability
        / with the mm3 patches to kernel 2.6.18:
        /
        / if (drbd_request_cache && kmem_cache_destroy(drbd_request_cache))
        / printk(KERN_ERR DEVICE_NAME
        */

        // FIXME what can we do if we fail to destroy them?

        drbd_request_mempool = NULL;
        drbd_ee_cache = NULL;
        drbd_request_cache = NULL;

        return;
}