block: fix request sorting at unplug
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Sun, 3 Apr 2011 22:15:02 +0000 (00:15 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 5 Apr 2011 21:52:49 +0000 (23:52 +0200)
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: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

No differences found