Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

Commit

Permalink
block: elevator: forbid init from changing I/O scheduler
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
YaroST12 authored and penglezos committed Apr 6, 2019
1 parent fa80dae commit 3a54f49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ static struct elevator_type *elevator_find(const char *name)
{
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))
return e;
Expand Down

0 comments on commit 3a54f49

Please sign in to comment.