Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c25573b5 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Ensure we always bump the backlog queue in xprt_free_slot



Whenever we free a slot, we know that the resulting xprt->num_reqs will
be less than xprt->max_reqs, so we know that we can release at least one
backlogged rpc_task.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>=3.1]
parent 7fdcf13b
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -995,13 +995,11 @@ out_init_req:

static void xprt_free_slot(struct rpc_xprt *xprt, struct rpc_rqst *req)
{
	if (xprt_dynamic_free_slot(xprt, req))
		return;

	memset(req, 0, sizeof(*req));	/* mark unused */

	spin_lock(&xprt->reserve_lock);
	if (!xprt_dynamic_free_slot(xprt, req)) {
		memset(req, 0, sizeof(*req));	/* mark unused */
		list_add(&req->rq_list, &xprt->free);
	}
	rpc_wake_up_next(&xprt->backlog);
	spin_unlock(&xprt->reserve_lock);
}