|
@@ -186,19 +186,20 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd)
|
|
|
|
|
|
reorder = &next_queue->reorder;
|
|
reorder = &next_queue->reorder;
|
|
|
|
|
|
|
|
+ spin_lock(&reorder->lock);
|
|
if (!list_empty(&reorder->list)) {
|
|
if (!list_empty(&reorder->list)) {
|
|
padata = list_entry(reorder->list.next,
|
|
padata = list_entry(reorder->list.next,
|
|
struct padata_priv, list);
|
|
struct padata_priv, list);
|
|
|
|
|
|
- spin_lock(&reorder->lock);
|
|
|
|
list_del_init(&padata->list);
|
|
list_del_init(&padata->list);
|
|
atomic_dec(&pd->reorder_objects);
|
|
atomic_dec(&pd->reorder_objects);
|
|
- spin_unlock(&reorder->lock);
|
|
|
|
|
|
|
|
pd->processed++;
|
|
pd->processed++;
|
|
|
|
|
|
|
|
+ spin_unlock(&reorder->lock);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
+ spin_unlock(&reorder->lock);
|
|
|
|
|
|
if (__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index) {
|
|
if (__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index) {
|
|
padata = ERR_PTR(-ENODATA);
|
|
padata = ERR_PTR(-ENODATA);
|