[vz8,1/2] ve, kthread: Remove some useless crud.

Submitted by Andrey Ryabinin on Oct. 17, 2019, 12:49 p.m.

Details

Message ID 20191017124905.22122-1-aryabinin@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Andrey Ryabinin Oct. 17, 2019, 12:49 p.m.
Simplify the code by removing useless macroses.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 include/linux/kthread.h | 16 ----------------
 kernel/ve/ve.c          |  7 +++++--
 net/sunrpc/svc.c        |  2 +-
 3 files changed, 6 insertions(+), 19 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 44fad78e7aa5..be56e19a78ec 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -59,22 +59,6 @@  struct task_struct *kthread_create_on_node_ve_flags(struct ve_struct *ve,
 						    void *data, int node,
 						    const char namefmt[],
 						    ...);
-
-#define kthread_create_on_node_ve(ve, arg...)				\
-	kthread_create_on_node_ve_flags(ve, 0, ##arg)
-
-#define kthread_create_ve(ve, threadfn, data, namefmt, arg...) \
-	kthread_create_on_node_ve(ve, threadfn, data, NUMA_NO_NODE, namefmt, ##arg)
-
-#define kthread_run_ve(ve, threadfn, data, namefmt, ...)		   \
-({									   \
-	struct task_struct *__k						   \
-		= kthread_create_ve(ve, threadfn, data, namefmt, ## __VA_ARGS__); \
-	if (!IS_ERR(__k))						   \
-		wake_up_process(__k);					   \
-	__k;								   \
-})
-
 #endif
 void free_kthread_struct(struct task_struct *k);
 void kthread_bind(struct task_struct *k, unsigned int cpu);
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index ab8283584e46..28b1d0748061 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -245,12 +245,15 @@  static int ve_start_umh(struct ve_struct *ve)
 	struct task_struct *task;
 
 	kthread_init_worker(&ve->umh_worker);
-	task = kthread_run_ve(ve, kthread_worker_fn,
-				      &ve->umh_worker,
+
+	task = kthread_create_on_node_ve_flags(ve, 0, kthread_worker_fn,
+				      &ve->umh_worker, NUMA_NO_NODE,
 				      "khelper");
 	if (IS_ERR(task))
 		return PTR_ERR(task);
 
+	wake_up_process(task);
+
 	ve->umh_task = task;
 	return 0;
 }
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 27a5289582ec..143b06f209f5 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -722,7 +722,7 @@  svc_start_kthreads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
 			return PTR_ERR(rqstp);
 
 		__module_get(serv->sv_ops->svo_module);
-		task = kthread_create_on_node_ve(get_exec_env(),
+		task = kthread_create_on_node_ve_flags(get_exec_env(), 0,
 						 serv->sv_ops->svo_function,
 						 rqstp, node,
 						 "%s", serv->sv_name);