From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Chapman Subject: [PATCH net-next v2 14/16] l2tp: remove redundant sk_user_data check when creating tunnels Date: Mon, 12 Feb 2018 10:11:18 +0000 Message-ID: <1518430280-16671-15-git-send-email-jchapman@katalix.com> References: <1518430280-16671-1-git-send-email-jchapman@katalix.com> Cc: kbuild-all@01.org To: netdev@vger.kernel.org Return-path: Received: from mail.katalix.com ([82.103.140.233]:38698 "EHLO mail.katalix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933711AbeBLKL1 (ORCPT ); Mon, 12 Feb 2018 05:11:27 -0500 In-Reply-To: <1518430280-16671-1-git-send-email-jchapman@katalix.com> Sender: netdev-owner@vger.kernel.org List-ID: l2tp_tunnel_create now checks sk_user_data so this check is redundant --- net/l2tp/l2tp_core.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index c909fe9273c9..a91cd384e397 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1488,14 +1488,6 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 break; } - /* Check if this socket has already been prepped */ - tunnel = l2tp_tunnel(sk); - if (tunnel != NULL) { - /* This socket has already been prepped */ - err = -EBUSY; - goto err; - } - tunnel = kzalloc(sizeof(struct l2tp_tunnel), GFP_KERNEL); if (tunnel == NULL) { err = -ENOMEM; -- 1.9.1