batman-adv: Fix mcast_flags debugfs output
Commit Message
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(-)
Comments
On Friday, May 13, 2016 18:35:41 Linus Lüssing wrote:
> 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(-)
Applied in revision 8151e97.
Thanks,
Marek
@@ -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;
}