ipvs: add __aquire/__release annotations to ip_vs_info_seq_start/ip_vs_info_seq_stop
authorSimon Horman <horms@verge.net.au>
Wed, 17 Sep 2008 00:10:42 +0000 (10:10 +1000)
committerSimon Horman <horms@verge.net.au>
Wed, 17 Sep 2008 00:10:42 +0000 (10:10 +1000)
This teaches sparse that the following are not problems:

make C=1
  CHECK   net/ipv4/ipvs/ip_vs_ctl.c
net/ipv4/ipvs/ip_vs_ctl.c:1793:14: warning: context imbalance in 'ip_vs_info_seq_start' - wrong count at exit
net/ipv4/ipvs/ip_vs_ctl.c:1842:13: warning: context imbalance in 'ip_vs_info_seq_stop' - unexpected unlock

Acked-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/ipv4/ipvs/ip_vs_ctl.c

index 60ca24b9ec00ca69c5ade801e085c41fcd660187..771551d8fba9e1cf9b2609db06ca3bea8c7cc2a9 100644 (file)
@@ -1787,6 +1787,7 @@ static struct ip_vs_service *ip_vs_info_array(struct seq_file *seq, loff_t pos)
 }
 
 static void *ip_vs_info_seq_start(struct seq_file *seq, loff_t *pos)
+__acquires(__ip_vs_svc_lock)
 {
 
        read_lock_bh(&__ip_vs_svc_lock);
@@ -1840,6 +1841,7 @@ static void *ip_vs_info_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 }
 
 static void ip_vs_info_seq_stop(struct seq_file *seq, void *v)
+__releases(__ip_vs_svc_lock)
 {
        read_unlock_bh(&__ip_vs_svc_lock);
 }