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

Commit 610e2ee4 authored by Chris Lew's avatar Chris Lew
Browse files

net: qrtr: Remove flow count on send failure



If the transport fails to send a message, remove the flow ref count
that this msg took in qrtr_tx_wait. This alleviates the pressure during
SSR cleanup and all sends are failing.

Change-Id: Ifdd4470ddff86f7848344ab6b84b7ee77ee4f634
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 846dbfa1
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -533,6 +533,17 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
	if (!rc && type == QRTR_TYPE_HELLO)
	if (!rc && type == QRTR_TYPE_HELLO)
		atomic_inc(&node->hello_sent);
		atomic_inc(&node->hello_sent);


	if (rc) {
		struct qrtr_tx_flow *flow;
		unsigned long key = (u64)to->sq_node << 32 | to->sq_port;

		mutex_lock(&node->qrtr_tx_lock);
		flow = radix_tree_lookup(&node->qrtr_tx_flow, key);
		if (flow)
			atomic_dec(&flow->pending);
		mutex_unlock(&node->qrtr_tx_lock);
	}

	return rc;
	return rc;
}
}