提交 ad64b8be 编写于 作者: L Lance Richardson 提交者: David S. Miller

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: NLance Richardson <lrichard@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0797cbd8
...@@ -1063,6 +1063,7 @@ static struct sock *ping_get_idx(struct seq_file *seq, loff_t pos) ...@@ -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) 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; struct ping_iter_state *state = seq->private;
state->bucket = 0; state->bucket = 0;
...@@ -1094,6 +1095,7 @@ void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos) ...@@ -1094,6 +1095,7 @@ void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos)
EXPORT_SYMBOL_GPL(ping_seq_next); EXPORT_SYMBOL_GPL(ping_seq_next);
void ping_seq_stop(struct seq_file *seq, void *v) void ping_seq_stop(struct seq_file *seq, void *v)
__releases(ping_table.lock)
{ {
read_unlock_bh(&ping_table.lock); read_unlock_bh(&ping_table.lock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册