Whamcloud - gitweb
LU-14159 build: fix gcc8 warnings on kthread_run calls
[fs/lustre-release.git] / libcfs / libcfs / workitem.c
index f370ffa..aa243a0 100644 (file)
@@ -126,8 +126,6 @@ cfs_wi_exit(struct cfs_wi_sched *sched, struct cfs_workitem *wi)
 
        wi->wi_scheduled = 1; /* LBUG future schedule attempts */
        spin_unlock(&sched->ws_lock);
-
-       return;
 }
 EXPORT_SYMBOL(cfs_wi_exit);
 
@@ -198,7 +196,6 @@ cfs_wi_schedule(struct cfs_wi_sched *sched, struct cfs_workitem *wi)
 
        LASSERT (!list_empty(&wi->wi_list));
        spin_unlock(&sched->ws_lock);
-       return;
 }
 EXPORT_SYMBOL(cfs_wi_schedule);
 
@@ -207,8 +204,6 @@ cfs_wi_scheduler(void *arg)
 {
        struct cfs_wi_sched *sched = (struct cfs_wi_sched *)arg;
 
-       cfs_block_allsigs();
-
        /* CPT affinity scheduler? */
        if (sched->ws_cptab != NULL)
                if (cfs_cpt_bind(sched->ws_cptab, sched->ws_cpt) != 0)
@@ -318,8 +313,8 @@ cfs_wi_sched_destroy(struct cfs_wi_sched *sched)
                               i / 20, sched->ws_nthreads, sched->ws_name);
 
                        spin_unlock(&cfs_wi_data.wi_glock);
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout(cfs_time_seconds(1) / 20);
+                       schedule_timeout_uninterruptible(cfs_time_seconds(1)
+                                                        / 20);
                        spin_lock(&cfs_wi_data.wi_glock);
                }
        }
@@ -388,7 +383,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab,
                                 sched->ws_name, sched->ws_nthreads);
                }
 
-               task = kthread_run(cfs_wi_scheduler, sched, name);
+               task = kthread_run(cfs_wi_scheduler, sched, "%s", name);
                if (IS_ERR(task)) {
                        int rc = PTR_ERR(task);
 
@@ -449,8 +444,8 @@ cfs_wi_shutdown (void)
 
                while (sched->ws_nthreads != 0) {
                        spin_unlock(&cfs_wi_data.wi_glock);
-                       set_current_state(TASK_UNINTERRUPTIBLE);
-                       schedule_timeout(cfs_time_seconds(1) / 20);
+                       schedule_timeout_uninterruptible(cfs_time_seconds(1)
+                                                        / 20);
                        spin_lock(&cfs_wi_data.wi_glock);
                }
                spin_unlock(&cfs_wi_data.wi_glock);