提交 ed653a64 编写于 作者: A akpm@osdl.org 提交者: Linus Torvalds

[PATCH] Remove set_fs() in stop_machine()

)

From: Brian Gerst <bgerst@didntduck.org>

Call sched_setscheduler() directly instead.
Signed-off-by: NBrian Gerst <bgerst@didntduck.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 df2e71fb
......@@ -87,13 +87,9 @@ static int stop_machine(void)
{
int i, ret = 0;
struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
mm_segment_t old_fs = get_fs();
/* One high-prio thread per cpu. We'll do this one. */
set_fs(KERNEL_DS);
sys_sched_setscheduler(current->pid, SCHED_FIFO,
(struct sched_param __user *)&param);
set_fs(old_fs);
sched_setscheduler(current, SCHED_FIFO, &param);
atomic_set(&stopmachine_thread_ack, 0);
stopmachine_num_threads = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册