Whamcloud - gitweb
LU-9010 tests: Change static defines to use macro for kinode.c 35/33935/4
authorArshad Hussain <arshad.super@gmail.com>
Thu, 27 Dec 2018 18:19:40 +0000 (13:19 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Jan 2019 06:18:07 +0000 (06:18 +0000)
This patch replaces completion which is defined statically in
file lustre/tests/kernel/kinode.c with kernel provided macro.

Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I7b41d3f0a67f471fe7f5dfa840521dc690a163d2
Reviewed-on: https://review.whamcloud.com/33935
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/kernel/kinode.c

index b143ab8..6a6bd36 100644 (file)
@@ -49,7 +49,7 @@ static char fname[4096];
 module_param_string(fname, fname, sizeof(fname), 0644);
 MODULE_PARM_DESC(fname, "name of file to stat");
 
-struct completion thr_start;
+static DECLARE_COMPLETION(thr_start);
 
 #define PREFIX "lustre_kinode_%u:"
 
@@ -131,7 +131,6 @@ static int __init kinode_init(void)
        }
 
        /* Run the same from a kthread. */
-       init_completion(&thr_start);
        thr = kthread_run(stat_thread, &stbuf2, "kinode_%u", run_id);
        if (IS_ERR(thr)) {
                pr_err(PREFIX " Cannot create kthread\n", run_id);