Whamcloud - gitweb
LU-1406 ofd: init lu_target in OFD
[fs/lustre-release.git] / lnet / utils / lstclient.c
index 1d72000..d79d343 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,9 +200,17 @@ main(int argc, char **argv)
                 return -1;
         }
 
+        rc = cfs_wi_startup();
+        if (rc != 0) {
+                CERROR("cfs_wi_startup() failed: %d\n", rc);
+                libcfs_debug_cleanup();
+                return -1;
+        }
+
         rc = LNetInit();
         if (rc != 0) {
                 CERROR("LNetInit() failed: %d\n", rc);
+                cfs_wi_shutdown();
                 libcfs_debug_cleanup();
                 return -1;
         }
@@ -216,8 +222,8 @@ main(int argc, char **argv)
         if (rc != 0) {
                 fprintf(stderr, "Can't startup selftest\n");
                 LNetFini();
+                cfs_wi_shutdown();
                 libcfs_debug_cleanup();
-
                 return -1;
         }
 
@@ -244,6 +250,8 @@ out:
 
         LNetFini();
 
+        cfs_wi_shutdown();
+
         libcfs_debug_cleanup();
 
         return rc;