batman-adv: use atomic_xchg() for gw.reselect check

batadv_gw_election() only needs to test whether gw.reselect was set and
clear it afterwards. Replace the batadv_atomic_dec_not_zero()
[atomic_add_unless(..., -1, 0)] call with atomic_xchg(..., 0) to simplify
the logic and make the intent more explicit.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2026-05-12 22:03:53 +02:00
commit 9550dd11e3
No known key found for this signature in database
GPG key ID: 4D0F772BD314F5CB