Skip to content
Commit f83e8261 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Jens Axboe
Browse files

block: fix request sorting at unplug



Comparison function for list_sort() must be anticommutative,
otherwise it is not sorting in ordinary meaning.

But fortunately list_sort() always check ((*cmp)(priv, a, b) <= 0)
it not distinguish negative and zero, so comparison function can
implement only less-or-equal instead of full three-way comparison.

Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent a63a5cf8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment