aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-04-21 13:28:35 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-04-21 13:28:35 -0400
commit3aa72873ffdcc2f7919743efbbefc351ec73f5cb (patch)
treef159c777a489c6ac3721ba1f1cadbe2d86b19fa5 /block/elevator.c
parent584f79046780e10cb24367a691f8c28398a00e84 (diff)
elevator: check for ELEVATOR_INSERT_SORT_MERGE in !elvpriv case too
The sort insert is the one that goes to the IO scheduler. With the SORT_MERGE addition, we could bypass IO scheduler setup but still ask the IO scheduler to insert the request. This would cause an oops on switching IO schedulers through the sysfs interface, unless the disk just happened to be idle while it occured. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 6f6abc08bb56..45ca1e34f582 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -671,7 +671,8 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
671 q->boundary_rq = rq; 671 q->boundary_rq = rq;
672 } 672 }
673 } else if (!(rq->cmd_flags & REQ_ELVPRIV) && 673 } else if (!(rq->cmd_flags & REQ_ELVPRIV) &&
674 where == ELEVATOR_INSERT_SORT) 674 (where == ELEVATOR_INSERT_SORT ||
675 where == ELEVATOR_INSERT_SORT_MERGE))
675 where = ELEVATOR_INSERT_BACK; 676 where = ELEVATOR_INSERT_BACK;
676 677
677 switch (where) { 678 switch (where) {