The following commit has been merged in the merge/master branch: commit 8151e97ee0a3d897a377f0e8db5731a2d1bff7c6 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Fri May 13 18:35:41 2016 +0200
batman-adv: Fix mcast_flags debugfs output
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 Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
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; }