Whamcloud - gitweb
LU-5935 lnet: Fixes to make lnetctl function as expected.
[fs/lustre-release.git] / lnet / lnet / acceptor.c
index 9bdac05..c83843c 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -503,6 +503,7 @@ accept2secure(const char *acc, long *sec)
 int
 lnet_acceptor_start(void)
 {
+       struct task_struct *task;
         int  rc;
         long rc2;
         long secure;
@@ -529,10 +530,10 @@ lnet_acceptor_start(void)
        if (lnet_count_acceptor_nis() == 0)  /* not required */
                return 0;
 
-       rc2 = PTR_ERR(kthread_run(lnet_acceptor,
-                                 (void *)(ulong_ptr_t)secure,
-                                 "acceptor_%03ld", secure));
-       if (IS_ERR_VALUE(rc2)) {
+       task = kthread_run(lnet_acceptor, (void *)(ulong_ptr_t)secure,
+                          "acceptor_%03ld", secure);
+       if (IS_ERR(task)) {
+               rc2 = PTR_ERR(task);
                CERROR("Can't start acceptor thread: %ld\n", rc2);
                fini_completion(&lnet_acceptor_state.pta_signal);