summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/null_blk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 3107282a9741..cc801cde5cfa 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -195,6 +195,7 @@ static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer)
cq = &per_cpu(completion_queues, smp_processor_id());
while ((entry = llist_del_all(&cq->list)) != NULL) {
+ entry = llist_reverse_order(entry);
do {
cmd = container_of(entry, struct nullb_cmd, ll_list);
end_cmd(cmd);
@@ -235,6 +236,7 @@ static void null_ipi_cmd_end_io(void *data)
cq = &per_cpu(completion_queues, smp_processor_id());
entry = llist_del_all(&cq->list);
+ entry = llist_reverse_order(entry);
while (entry) {
next = entry->next;