diff mbox

batman-adv: Fix mcast_flags debugfs output

Message ID 1463156673-6658-1-git-send-email-linus.luessing@c0d3.blue
State Superseded, archived
Headers show

Commit Message

Linus Lüssing May 13, 2016, 4:24 p.m. UTC
We recently switched to the atomic variants set_bit() / clear_bit()
/ test_bit() for originator capabilities.

Unfortunately, this was missed for the new multicast debugfs
entry, resulting in an empty multicast flags table.

Fixing this by using test_bit().

Fixes: f1f0fbb2c956 ("batman-adv: Add debugfs table for mcast flags")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
 net/batman-adv/multicast.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index abb12f1..2dd5aec 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -1205,12 +1205,12 @@  int batadv_mcast_flags_seq_print_text(struct seq_file *seq, void *offset)
 
 		rcu_read_lock();
 		hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
-			if (!(orig_node->capa_initialized &
-			      BATADV_ORIG_CAPA_HAS_MCAST))
+			if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST,
+				      &orig_node->capa_initialized))
 				continue;
 
-			if (!(orig_node->capabilities &
-			      BATADV_ORIG_CAPA_HAS_MCAST)) {
+			if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST,
+				      &orig_node->capabilities)) {
 				seq_printf(seq, "%pM -\n", orig_node->orig);
 				continue;
 			}