[Devel] [PATCH RHEL8 COMMIT] ve, kthread: Remove some useless crud.
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Oct 18 11:59:21 MSK 2019
The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.1
------>
commit e38d719fec1a4d43e596f9576cac97636c374a4d
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Fri Oct 18 11:59:09 2019 +0300
ve, kthread: Remove some useless crud.
Simplify the code by removing useless macroses.
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
include/linux/kthread.h | 16 ----------------
kernel/ve/ve.c | 7 +++++--
net/sunrpc/svc.c | 2 +-
3 files changed, 6 insertions(+), 19 deletions(-)
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);
More information about the Devel
mailing list