Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1628642ybg; Thu, 4 Jun 2020 14:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPmELFZ4vz8Ie0FGfE8COdKsfMu61bb+yxedWpqoBbyOzx2y9J7SkndgF/OYjz0HHMaH+o X-Received: by 2002:a17:906:34c4:: with SMTP id h4mr6158383ejb.167.1591307919718; Thu, 04 Jun 2020 14:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591307919; cv=none; d=google.com; s=arc-20160816; b=bfyyisZjHV6dxIO6fCmA/AuHxMjEfzgWBpgN96+btwZUHFsvbal30xJLvfDZYYNsCh l+kHk07RRoS4CnB59uiNRGP/bBmdMmSuPeckUjnZAdCKeFYs9FrA8cKHbJQTTqN0arf/ c8+Rzr/hJNBlarWwZzAV6rexJ1jWabHuuAhNAJW48Ah72B32vW479Kjfe9W4co12IvxA 2SvKox13DWWnf20t91lRL97W7ZTSgiNqrb7JVzI4hk+DQu1T0gmXmVq8hZWROX7Xfn6Q EytU4N1ZsEPXdkrKtrPeMZ2156zUX6LRvo/oATObtuSrNPMRN5TyywqviCN2Txo5nbnU vbrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date; bh=v6BBndLvOwD3FhCI5PGwnX61qRpahI023mm65mSrxYk=; b=romhZqs4tas1ofIe7A+FYLfiO+XDXIWlc0wUX+OfnhAU+G5JhQ0UTpW0K1amneRxZZ EDbidByFnBzPNvhE0axYApOyIchfpJNHyIfB1hgsXvyux6lhi3iUIxx87k3Hq/e0rgg9 oKgjAIeF0WxhYCHVMaH0bva6Qio5qen1bDda7oPEhEZiVtqE271cNM4jmEtJ+wqGL9Eu pss9OpqaI+tAO1Ug5+OmByQqGk/qmi0qsEE8HiD+41U3cOuX92I9SXoMg1xa8PSzuWQp XYfsJFeGooEpSlRr5te4t3Jx1/KDjvXqVoqppfey+zTyGaU19RWgQj/lZ6VFnvj0f0dU Iulw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si2363857ejy.722.2020.06.04.14.58.16; Thu, 04 Jun 2020 14:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbgFDVl7 (ORCPT + 99 others); Thu, 4 Jun 2020 17:41:59 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:33572 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgFDVl7 (ORCPT ); Thu, 4 Jun 2020 17:41:59 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 119331C0BD2; Thu, 4 Jun 2020 23:41:58 +0200 (CEST) Date: Thu, 4 Jun 2020 23:41:57 +0200 From: Pavel Machek To: johannes@sipsolutions.net, davem@davemloft.net, kuba@kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, trivial@kernel.org Subject: [PATCH] net/80211: simplify mesh code Message-ID: <20200604214157.GA9737@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Doing mod_timer() conditionaly is easier than conditionally unlocking and jumping around... Signed-off-by: Pavel Machek (CIP) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index aa5150929996..02cde0fd08fe 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -1105,11 +1105,8 @@ void mesh_path_start_discovery(struct ieee80211_sub_= if_data *sdata) ttl, lifetime, 0, ifmsh->preq_id++, sdata); =20 spin_lock_bh(&mpath->state_lock); - if (mpath->flags & MESH_PATH_DELETED) { - spin_unlock_bh(&mpath->state_lock); - goto enddiscovery; - } - mod_timer(&mpath->timer, jiffies + mpath->discovery_timeout); + if (!(mpath->flags & MESH_PATH_DELETED)) + mod_timer(&mpath->timer, jiffies + mpath->discovery_timeout); spin_unlock_bh(&mpath->state_lock); =20 enddiscovery: --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl7ZaqUACgkQMOfwapXb+vKyqwCdHd1ip1n/N1xi3CytHvd/tfr8 JYMAoJW3Y/uAFJlNHOVs8U5w9fTIgfyi =g+rG -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--