Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: netrom: Add missing annotation for nr_neigh_start()

Sparse reports a warning at nr_neigh_start()
warning: context imbalance in nr_neigh_start() - wrong count at exit
The root cause is the missing annotation at nr_neigh_start()
Add the missing __acquires(&nr_neigh_list_lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jules Irenge and committed by
David S. Miller
2d6b6acf 0eb713fb

+1
+1
net/netrom/nr_route.c
··· 895 895 }; 896 896 897 897 static void *nr_neigh_start(struct seq_file *seq, loff_t *pos) 898 + __acquires(&nr_neigh_list_lock) 898 899 { 899 900 spin_lock_bh(&nr_neigh_list_lock); 900 901 return seq_hlist_start_head(&nr_neigh_list, *pos);