block: fix elevator_get_by_features()
authorJens Axboe <axboe@kernel.dk>
Fri, 6 Sep 2019 13:02:31 +0000 (07:02 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 6 Sep 2019 13:02:31 +0000 (07:02 -0600)
commita26142559c2be8c0975b941e3110d23a9e552ce5
tree013121f3e988d1787cb5956701ff407bffbb1124
parentebddd2a15323856d82d22b49236604c2e0d23ab9
block: fix elevator_get_by_features()

The lookup logic is broken - 'e' will never be NULL, even if the
list is empty. Maintain lookup hit in a separate variable instead.

Fixes: a0958ba7fcdc ("block: Improve default elevator selection")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/elevator.c