On 12/6/24 05:55, Alexander Atanasov wrote:
@@ -1871,18 +1901,16 @@ static void ploop_submit_embedded_pio(struct ploop 
*ploop, struct pio *pio)
                worker = &ploop->fsync_worker;
        }
- spin_lock_irqsave(&ploop->deferred_lock, flags);
        if (unlikely(ploop->stop_submitting_pios)) {
                llist_add((struct llist_node *)(&pio->list), 
&ploop->llsuspended_pios);
                queue = false;
-               goto unlock;
+               goto out;

Maybe just return here? We only set queue to false in this branch and one more where we can just return instead, so we can, probably, also remove queue variable in this patch.

        }
ploop_inc_nr_inflight(ploop, pio);
-       list_add_tail(&pio->list, &ploop->pios[pio->queue_list_id]);
-unlock:
-       spin_unlock_irqrestore(&ploop->deferred_lock, flags);
+       llist_add((struct llist_node *)(&pio->list), 
&ploop->pios[pio->queue_list_id]);
+out:
        if (queue)
                queue_work(ploop->wq, worker);
  }

--
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to