5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Avi Weiss [ Upstream commit 8acd94f02a960c8936df25a7af9c02c8ea87064d ] When call_connect_status() moves a task off a transport marked for removal, it decrements xprt->queuelen but leaves the switch's xps_queuelen unchanged. The stale count persists after the task finishes and skews multipath transport selection. Decrement xps_queuelen alongside xprt->queuelen, matching the normal transport release path. Fixes: 6f081693e7b2 ("sunrpc: remove an offlined xprt using sysfs") Signed-off-by: Avi Weiss Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index de2d24a16087e..7d7950068b030 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2131,6 +2131,7 @@ call_connect_status(struct rpc_task *task) xprt_release(task); value = atomic_long_dec_return(&xprt->queuelen); + atomic_long_dec(&xps->xps_queuelen); if (value == 0) rpc_xprt_switch_remove_xprt(xps, saved); xprt_put(saved); -- 2.53.0