diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-11-15 01:17:05 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-15 01:21:25 +0300 |
commit | 98c98cb770da9469ee868f21299b2ba21fe438ac (patch) | |
tree | e66d66d22708c1f351364140bda4650daaadaa8a /block | |
parent | 30e066286e232772cad72c87008a958e23e40a33 (diff) | |
download | linux-98c98cb770da9469ee868f21299b2ba21fe438ac.tar.xz |
block: clean up dead code that is now redundant
The boolean next_sorted is set to false and is never changed, hence
the code that checks if it is true is dead code and can now be
removed. This dead code occurred from a previous commit that cleaned
up the elevator and removed the setting of next_sorted to true.
Detected by CoverityScan, CID#1475401 ("'Constant' variable guards
dead code")
Fixes: a1ce35fa4985 ("block: remove dead elevator code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/block/elevator.c b/block/elevator.c index 19351ffa56b1..796436270682 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -394,18 +394,11 @@ void elv_merge_requests(struct request_queue *q, struct request *rq, struct request *next) { struct elevator_queue *e = q->elevator; - bool next_sorted = false; if (e->type->ops.requests_merged) e->type->ops.requests_merged(q, rq, next); elv_rqhash_reposition(q, rq); - - if (next_sorted) { - elv_rqhash_del(q, next); - q->nr_sorted--; - } - q->last_merge = rq; } |