Whamcloud - gitweb
LU-3810 obd: Cleanup client import if client_obd_setup fails
[fs/lustre-release.git] / lustre / osp / lwp_dev.c
index 85c2641..fce82a2 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel Corporation
+ * Copyright (c) 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * lustre/osp/lwp_dev.c
@@ -32,9 +32,6 @@
  * Author: <di.wang@intel.com>
  * Author: <yawei.niu@intel.com>
  */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 #define DEBUG_SUBSYSTEM S_OST
 
 #include <obd_class.h>
@@ -148,6 +145,7 @@ out:
                lustre_cfg_free(lcfg);
        if (rc)
                client_obd_cleanup(lwp->lpd_obd);
+
        RETURN(rc);
 }
 
@@ -324,8 +322,6 @@ static struct lu_device *lwp_device_fini(const struct lu_env *env,
                imp->imp_rq_pool = NULL;
        }
 
-       obd_cleanup_client_import(m->lpd_obd);
-
        LASSERT(m->lpd_obd);
        ptlrpc_lprocfs_unregister_obd(m->lpd_obd);
        lprocfs_obd_cleanup(m->lpd_obd);