The msgs kept in the llist are in reverse order that must be reversed
before traversing. Misordered msgs could hit performance severely.

Fixes: VSTOR-103577
https://virtuozzo.atlassian.net/browse/VSTOR-103577

Signed-off-by: Liu Kui <kui....@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_krpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c
index eac6ac9c34bd..78180bdb4993 100644
--- a/fs/fuse/kio/pcs/pcs_krpc.c
+++ b/fs/fuse/kio/pcs/pcs_krpc.c
@@ -653,6 +653,7 @@ static int krpc_threadfn(void *data)
 
                __set_current_state(TASK_RUNNING);
 
+               ll = llist_reverse_order(ll);
                while (ll) {
                        struct llist_node *next = ll->next;
                        struct krpc_req *kreq = container_of(ll, struct 
krpc_req, llist_link);
-- 
2.39.5 (Apple Git-154)

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

Reply via email to