mutex_unlock(&dm_bufio_clients_lock);
- BUG_ON(!RB_EMPTY_ROOT(&c->buffer_tree));
- BUG_ON(c->need_reserved_buffers);
+ WARN_ON(!RB_EMPTY_ROOT(&c->buffer_tree));
+ WARN_ON(c->need_reserved_buffers);
while (!list_empty(&c->reserved_buffers)) {
struct dm_buffer *b = list_entry(c->reserved_buffers.next,
DMERR("leaked buffer count %d: %ld", i, c->n_buffers[i]);
for (i = 0; i < LIST_SIZE; i++)
- BUG_ON(c->n_buffers[i]);
+ WARN_ON(c->n_buffers[i]);
kmem_cache_destroy(c->slab_cache);
kmem_cache_destroy(c->slab_buffer);
bug = 1;
}
- BUG_ON(bug);
+ WARN_ON(bug); /* leaks are not worth crashing the system */
}
module_init(dm_bufio_init)