[PATCH net-next] inet_diag: Remove _bh suffix in inet_diag_dump_reqs().

Subsystems: networking [general], the rest

STALE4062d

4 messages, 3 authors, 2015-06-23 · open the first message on its own page

[PATCH net-next] inet_diag: Remove _bh suffix in inet_diag_dump_reqs().

From: Hiroaki Shimoda <hidden>
Date: 2015-06-18 11:41:06

inet_diag_dump_reqs() is called from inet_diag_dump_icsk() with BH
disabled. So no need to disable BH in inet_diag_dump_reqs().

Signed-off-by: Hiroaki Shimoda <redacted>
---
 net/ipv4/inet_diag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 21985d8d41e7..4ca789ba63cb 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -746,7 +746,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
 
 	entry.family = sk->sk_family;
 
-	spin_lock_bh(&icsk->icsk_accept_queue.syn_wait_lock);
+	spin_lock(&icsk->icsk_accept_queue.syn_wait_lock);
 
 	lopt = icsk->icsk_accept_queue.listen_opt;
 	if (!lopt || !listen_sock_qlen(lopt))
@@ -794,7 +794,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
 	}
 
 out:
-	spin_unlock_bh(&icsk->icsk_accept_queue.syn_wait_lock);
+	spin_unlock(&icsk->icsk_accept_queue.syn_wait_lock);
 
 	return err;
 }
-- 
2.3.6

Re: [PATCH net-next] inet_diag: Remove _bh suffix in inet_diag_dump_reqs().

From: Eric Dumazet <hidden>
Date: 2015-06-19 06:42:13

On Thu, 2015-06-18 at 20:40 +0900, Hiroaki Shimoda wrote:
quoted hunk
inet_diag_dump_reqs() is called from inet_diag_dump_icsk() with BH
disabled. So no need to disable BH in inet_diag_dump_reqs().

Signed-off-by: Hiroaki Shimoda <redacted>
---
 net/ipv4/inet_diag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 21985d8d41e7..4ca789ba63cb 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -746,7 +746,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
 
 	entry.family = sk->sk_family;
 
-	spin_lock_bh(&icsk->icsk_accept_queue.syn_wait_lock);
+	spin_lock(&icsk->icsk_accept_queue.syn_wait_lock);
 
 	lopt = icsk->icsk_accept_queue.listen_opt;
 	if (!lopt || !listen_sock_qlen(lopt))
@@ -794,7 +794,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
 	}
 
 out:
-	spin_unlock_bh(&icsk->icsk_accept_queue.syn_wait_lock);
+	spin_unlock(&icsk->icsk_accept_queue.syn_wait_lock);
 
 	return err;
 }
Sure, although this will soon be removed completely when SYN_RECV
sockets will be stored in regular ehash table.

Thanks

Re: [PATCH net-next] inet_diag: Remove _bh suffix in inet_diag_dump_reqs().

From: Hiroaki Shimoda <hidden>
Date: 2015-06-19 10:34:07

On Thu, 18 Jun 2015 23:42:08 -0700
Eric Dumazet [off-list ref] wrote:
Sure, although this will soon be removed completely when SYN_RECV
sockets will be stored in regular ehash table.
OK. Thank you for letting me know.

Re: [PATCH net-next] inet_diag: Remove _bh suffix in inet_diag_dump_reqs().

From: David Miller <davem@davemloft.net>
Date: 2015-06-23 08:08:45

From: Hiroaki Shimoda <redacted>
Date: Thu, 18 Jun 2015 20:40:54 +0900
inet_diag_dump_reqs() is called from inet_diag_dump_icsk() with BH
disabled. So no need to disable BH in inet_diag_dump_reqs().

Signed-off-by: Hiroaki Shimoda <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help