|
@@ -240,19 +240,19 @@ static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer)
|
|
|
while ((entry = llist_del_all(&cq->list)) != NULL) {
|
|
while ((entry = llist_del_all(&cq->list)) != NULL) {
|
|
|
entry = llist_reverse_order(entry);
|
|
entry = llist_reverse_order(entry);
|
|
|
do {
|
|
do {
|
|
|
|
|
+ struct request_queue *q = NULL;
|
|
|
|
|
+
|
|
|
cmd = container_of(entry, struct nullb_cmd, ll_list);
|
|
cmd = container_of(entry, struct nullb_cmd, ll_list);
|
|
|
entry = entry->next;
|
|
entry = entry->next;
|
|
|
|
|
+ if (cmd->rq)
|
|
|
|
|
+ q = cmd->rq->q;
|
|
|
end_cmd(cmd);
|
|
end_cmd(cmd);
|
|
|
|
|
|
|
|
- if (cmd->rq) {
|
|
|
|
|
- struct request_queue *q = cmd->rq->q;
|
|
|
|
|
-
|
|
|
|
|
- if (!q->mq_ops && blk_queue_stopped(q)) {
|
|
|
|
|
- spin_lock(q->queue_lock);
|
|
|
|
|
- if (blk_queue_stopped(q))
|
|
|
|
|
- blk_start_queue(q);
|
|
|
|
|
- spin_unlock(q->queue_lock);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (q && !q->mq_ops && blk_queue_stopped(q)) {
|
|
|
|
|
+ spin_lock(q->queue_lock);
|
|
|
|
|
+ if (blk_queue_stopped(q))
|
|
|
|
|
+ blk_start_queue(q);
|
|
|
|
|
+ spin_unlock(q->queue_lock);
|
|
|
}
|
|
}
|
|
|
} while (entry);
|
|
} while (entry);
|
|
|
}
|
|
}
|