Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp246954imj; Thu, 7 Feb 2019 03:45:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IYiXRk1+9anNevQbyJHzsU/skVcr/h/qyVBDQmzGPRxS9HDVFp90mPlrGnN54NaUiy+C+Gx X-Received: by 2002:a63:b105:: with SMTP id r5mr14520853pgf.442.1549539948215; Thu, 07 Feb 2019 03:45:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549539948; cv=none; d=google.com; s=arc-20160816; b=rWUIe3nBdPcMKqY0XgjkJsMSchRIvcrMggRfHlGwpV8xdwLdxJ7QYQMdJvG1SrCqVL 3qXjr56h0i+n7hiYn9nJs8azsK3F/EGqQRIDoHqra1LRsUIp0kG6ctjzC8C9dh+MXu9o ZwmghAVcuXOayT98DIowIPfcwJFG2jI7k+rBiF4U4mvn3/lSLCu9W6m2agGIDzKhbVQa 3Rjq2+csRLmp3EaBY4Iz+kaex9JApyoeWz0QAkEJXHsdDXChnrwNd6ksnKuIHPTUDMIo e7coDDE2fSmF+pBMdID0WL9/DA6Rq45aSY/odE2q2KTb6HjmZuv9Ni6qVzCB6OKal22+ NXQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2e1q5zRcRPBcG+JSlg+C36EKkkdsXAHF4Lhmi2eOkvI=; b=yY8xKO9Sm2D11k9A4UxaxFVKsSS5VvisDyUAxwFf2V5/HP4F6mIobWTb9jtYYFkKyM sC75vMZrTlWx+NlpxpvGjv9YJWWEzap7ScFcigWio5FKZdwXeQau+m3mIPrUyKcondE7 111udqvdcZNo35PzHXogvPibjLF6JCtovhSiiQkpj5eeQZ4t1LrlRuBjNhFkHBjNVrN3 xr3PbKfOuel5opkKuXektNDNv/VQIdi+qxypQ6oRdXVvCO5JrjrOmhV/YLYHF9KQhHNh ppYJUp9Y7K2DnXbvSpX8ivM5gsGEqo9Pds1n49VAcLkKEB6iRswLMxw0OuvvYXenXgHg sT2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eHUVi9eX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si8899810pfi.75.2019.02.07.03.45.33; Thu, 07 Feb 2019 03:45:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eHUVi9eX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727464AbfBGLn2 (ORCPT + 99 others); Thu, 7 Feb 2019 06:43:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:33678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727423AbfBGLn0 (ORCPT ); Thu, 7 Feb 2019 06:43:26 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC5A921907; Thu, 7 Feb 2019 11:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549539805; bh=UsidTJ97iBWOL2Frxx4t0fNr0Fvyf2F4ljbNf14n3II=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHUVi9eXrtOoE9nO5ig32DzE37/DSJZZSeeP4F0libN0FnBwsvpMyLV7+Izaj49jj iyVBEx+B+2eghVfMrOtcNQk/++XrpaW0ZILQZ0yWdkpuA1nfwC11uqX3CxSFnA5AdM acrzQrKDDpqsSQYYC8Odbf+zNiCPetd18WOTSlcA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" , Ben Hutchings Subject: [PATCH 4.4 14/34] inet: frags: remove inet_frag_maybe_warn_overflow() Date: Thu, 7 Feb 2019 12:41:56 +0100 Message-Id: <20190207113026.138410319@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207113025.552605181@linuxfoundation.org> References: <20190207113025.552605181@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet commit 2d44ed22e607f9a285b049de2263e3840673a260 upstream. This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- include/net/inet_frag.h | 2 -- net/ieee802154/6lowpan/reassembly.c | 5 ++--- net/ipv4/inet_fragment.c | 11 ----------- net/ipv4/ip_fragment.c | 5 ++--- net/ipv6/netfilter/nf_conntrack_reasm.c | 5 ++--- net/ipv6/reassembly.c | 5 ++--- 6 files changed, 8 insertions(+), 25 deletions(-) --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -109,8 +109,6 @@ void inet_frags_exit_net(struct netns_fr void inet_frag_kill(struct inet_frag_queue *q); void inet_frag_destroy(struct inet_frag_queue *q); struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key); -void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, - const char *prefix); static inline void inet_frag_put(struct inet_frag_queue *q) { --- a/net/ieee802154/6lowpan/reassembly.c +++ b/net/ieee802154/6lowpan/reassembly.c @@ -83,10 +83,9 @@ fq_find(struct net *net, const struct lo key.dst = *dst; q = inet_frag_find(&ieee802154_lowpan->frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct lowpan_frag_queue, q); } --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c @@ -225,14 +225,3 @@ struct inet_frag_queue *inet_frag_find(s return inet_frag_create(nf, key); } EXPORT_SYMBOL(inet_frag_find); - -void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, - const char *prefix) -{ - static const char msg[] = "inet_frag_find: Fragment hash bucket" - " list length grew over limit. Dropping fragment.\n"; - - if (PTR_ERR(q) == -ENOBUFS) - net_dbg_ratelimited("%s%s", prefix, msg); -} -EXPORT_SYMBOL(inet_frag_maybe_warn_overflow); --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -221,10 +221,9 @@ static struct ipq *ip_find(struct net *n struct inet_frag_queue *q; q = inet_frag_find(&net->ipv4.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct ipq, q); } --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -184,10 +184,9 @@ static struct frag_queue *fq_find(struct struct inet_frag_queue *q; q = inet_frag_find(&net->nf_frag.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct frag_queue, q); } --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -154,10 +154,9 @@ fq_find(struct net *net, __be32 id, cons key.iif = 0; q = inet_frag_find(&net->ipv6.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct frag_queue, q); }