Skip to content

Commit 98c98cb

Browse files
Colin Ian Kingaxboe
authored andcommitted
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: a1ce35f ("block: remove dead elevator code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 30e0662 commit 98c98cb

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

‎block/elevator.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,18 +394,11 @@ void elv_merge_requests(struct request_queue *q, struct request *rq,
394394
struct request *next)
395395
{
396396
struct elevator_queue *e = q->elevator;
397-
bool next_sorted = false;
398397

399398
if (e->type->ops.requests_merged)
400399
e->type->ops.requests_merged(q, rq, next);
401400

402401
elv_rqhash_reposition(q, rq);
403-
404-
if (next_sorted) {
405-
elv_rqhash_del(q, next);
406-
q->nr_sorted--;
407-
}
408-
409402
q->last_merge = rq;
410403
}
411404

0 commit comments

Comments
 (0)