/* tipc_bearer_resolve_congestion(): Check if there is bearer congestion, and if there is, try to resolve it before returning. 'tipc_net_lock' is read_locked when this function is called  */
int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr)
/* tipc_bearer_resolve_congestion(): Check if there is bearer congestion, and if there is, try to resolve it before returning. 'tipc_net_lock' is read_locked when this function is called  */
int tipc_bearer_resolve_congestion(struct bearer *b_ptr, struct link *l_ptr)
{
	int res = 1;
	if (list_empty(&b_ptr->cong_links))
		return 1;
	spin_lock_bh(&b_ptr->publ.lock);
	if (!bearer_push(b_ptr)) {
		tipc_bearer_schedule_unlocked(b_ptr, l_ptr);
		res = 0;
	}
	spin_unlock_bh(&b_ptr->publ.lock);
	return res;
}