On 10.01.25 10:14, Pavel Tikhomirov wrote:
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.
To have a single return point in the function, i see there is a return
so may be i'll change it to a goto too.
}
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);
}
--
Regards,
Alexander Atanasov
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel