History

block: avoid setting none scheduler if it's already none

There's no reason to freeze queue and remove scheduler if there's no scheduler already.

Aleksei Zakharov committed 7 years ago

Commit fbd72121 parent b7143fe1 file · +4 −1Browse files

Unified · Split

block/elevator.c+4−1
@@ -667,8 +667,11 @@ static int __elevator_change(struct request_queue *q, const char *name) · 666 unmodified lines
667667 /*
668668 * Special case for mq, turn off scheduling
669669 */
670− if (!strncmp(name, "none", 4))
670+ if (!strncmp(name, "none", 4)) {
671+ if (!q->elevator)
672+ return 0;
671673 return elevator_switch(q, NULL);
674+ }
672675
673676 strlcpy(elevator_name, name, sizeof(elevator_name));
674677 e = elevator_get(q, strstrip(elevator_name), true);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t