diff mbox series

[28/29] l2tp: remove BUG_ON refcount value in l2tp_session_free

Message ID 20200721173221.4681-29-tparkin@katalix.com
State Changes Requested
Delegated to: David Miller
Headers show
Series l2tp: cleanup checkpatch.pl warnings | expand

Commit Message

Tom Parkin July 21, 2020, 5:32 p.m. UTC
l2tp_session_free is only called by l2tp_session_dec_refcount when the
reference count reaches zero, so it's of limited value to validate the
reference count value in l2tp_session_free itself.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
---
 net/l2tp/l2tp_core.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index c7c513e0b042..34dacb14042f 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1565,8 +1565,6 @@  void l2tp_session_free(struct l2tp_session *session)
 {
 	struct l2tp_tunnel *tunnel = session->tunnel;
 
-	BUG_ON(refcount_read(&session->ref_count) != 0);
-
 	if (tunnel) {
 		BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC);
 		l2tp_tunnel_dec_refcount(tunnel);