#if defined (CONFIG_DEBUG_MEMORY) && defined(__KERNEL__)
static spinlock_t obd_memlist_lock = SPIN_LOCK_UNLOCKED;
-static struct hlist_head *obd_memtable;
-static unsigned long obd_memtable_size;
+static struct hlist_head *obd_memtable = NULL;
+static unsigned long obd_memtable_size = 0;
static int lvfs_memdbg_init(int size)
{
CWARN("Allocating %lu memdbg entries.\n",
(unsigned long)obd_memtable_size);
+ LASSERT(obd_memtable == NULL);
obd_memtable = kmalloc(size, GFP_KERNEL);
if (!obd_memtable)
return -ENOMEM;
{
struct obd_device *obd = mdt->mdt_md_dev.md_lu_dev.ld_obd;
- /* remove transaction callback */
+ /* Remove transaction callback */
dt_txn_callback_del(mdt->mdt_bottom, &mdt->mdt_txn_cb);
class_disconnect_exports(obd); /* cleans up client info too */