block: elevator: forbid init from changing I/O scheduler
Userspace sets bfq when booting is done, we do not want this to happen because we use upstreamed cfq by default. Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: utsavbalar1231 <utsavbalar1231@gmail.com> Signed-off-by: Carlos Jimenez (JavaShin-X) <javashin1986@gmail.com>
This commit is contained in:
parent
63253831bc
commit
46e793402b
|
@ -90,6 +90,11 @@ static struct elevator_type *elevator_find(const char *name, bool mq)
|
|||
{
|
||||
struct elevator_type *e;
|
||||
|
||||
/* Forbid init from changing I/O scheduler from default */
|
||||
if (!strncmp(current->comm, "init", sizeof("init")))
|
||||
return NULL;
|
||||
|
||||
|
||||
list_for_each_entry(e, &elv_list, list) {
|
||||
if (!strcmp(e->elevator_name, name) && (mq == e->uses_mq))
|
||||
return e;
|
||||
|
|
Loading…
Reference in New Issue