diff options
author | Lance Richardson <lrichard@redhat.com> | 2016-01-07 01:22:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-09 05:30:43 +0300 |
commit | ad64b8be71e3a37ea43745aa69817c4bcd489987 (patch) | |
tree | cf1a9892c9950d1060f8dcbc6d62c35ad51faa18 /net/ipv4/ping.c | |
parent | 0797cbd8e2741c69a4d416d8f669639a064db8d1 (diff) | |
download | linux-ad64b8be71e3a37ea43745aa69817c4bcd489987.tar.xz |
ipv4: eliminate lock count warnings in ping.c
Add lock release/acquire annotations to ping_seq_start() and
ping_seq_stop() to satisfy sparse.
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index e89094ab5ddb..c117b21b937d 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -1063,6 +1063,7 @@ static struct sock *ping_get_idx(struct seq_file *seq, loff_t pos) } void *ping_seq_start(struct seq_file *seq, loff_t *pos, sa_family_t family) + __acquires(ping_table.lock) { struct ping_iter_state *state = seq->private; state->bucket = 0; @@ -1094,6 +1095,7 @@ void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos) EXPORT_SYMBOL_GPL(ping_seq_next); void ping_seq_stop(struct seq_file *seq, void *v) + __releases(ping_table.lock) { read_unlock_bh(&ping_table.lock); } |