Whamcloud - gitweb
b=19669
[fs/lustre-release.git] / lustre / mdd / mdd_device.c
index 58de195..ac8133a 100644 (file)
@@ -116,8 +116,10 @@ static void mdd_device_shutdown(const struct lu_env *env,
         ENTRY;
         mdd_changelog_fini(env, m);
         dt_txn_callback_del(m->mdd_child, &m->mdd_txn_cb);
-        mdd_object_put(env, m->mdd_dot_lustre_objs.mdd_obf);
-        mdd_object_put(env, m->mdd_dot_lustre);
+        if (m->mdd_dot_lustre_objs.mdd_obf)
+                mdd_object_put(env, m->mdd_dot_lustre_objs.mdd_obf);
+        if (m->mdd_dot_lustre)
+                mdd_object_put(env, m->mdd_dot_lustre);
         if (m->mdd_obd_dev)
                 mdd_fini_obd(env, m, cfg);
         orph_index_fini(env, m);