mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 17:33:01 +00:00
sctp: use read_lock_bh in sctp_eps_seq_show
This patch is to use read_lock_bh instead of local_bh_disable and read_lock in sctp_eps_seq_show. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6dfe4b97e0
commit
c0a4c2d1cd
@ -218,8 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
head = &sctp_ep_hashtable[hash];
|
head = &sctp_ep_hashtable[hash];
|
||||||
local_bh_disable();
|
read_lock_bh(&head->lock);
|
||||||
read_lock(&head->lock);
|
|
||||||
sctp_for_each_hentry(epb, &head->chain) {
|
sctp_for_each_hentry(epb, &head->chain) {
|
||||||
ep = sctp_ep(epb);
|
ep = sctp_ep(epb);
|
||||||
sk = epb->sk;
|
sk = epb->sk;
|
||||||
@ -234,8 +233,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
|
|||||||
sctp_seq_dump_local_addrs(seq, epb);
|
sctp_seq_dump_local_addrs(seq, epb);
|
||||||
seq_printf(seq, "\n");
|
seq_printf(seq, "\n");
|
||||||
}
|
}
|
||||||
read_unlock(&head->lock);
|
read_unlock_bh(&head->lock);
|
||||||
local_bh_enable();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user