From patchwork Thu Sep 20 11:28:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 10607539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13B71157B for ; Thu, 20 Sep 2018 11:29:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03EE02D0AA for ; Thu, 20 Sep 2018 11:29:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECD402D0C0; Thu, 20 Sep 2018 11:29:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4D632D0AA for ; Thu, 20 Sep 2018 11:29:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732374AbeITRMJ (ORCPT ); Thu, 20 Sep 2018 13:12:09 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:51048 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727029AbeITRMJ (ORCPT ); Thu, 20 Sep 2018 13:12:09 -0400 Received: from 91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.91) (envelope-from ) id 1g2x8h-0004SQ-NV; Thu, 20 Sep 2018 14:28:57 +0300 From: Luca Coelho To: backports@vger.kernel.org Cc: Luca Coelho Date: Thu, 20 Sep 2018 14:28:40 +0300 Message-Id: <20180920112842.27198-13-luca@coelho.fi> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180920112842.27198-1-luca@coelho.fi> References: <20180920112842.27198-1-luca@coelho.fi> Subject: [PATCH 12/14] backport: update lib-rhashtable.c Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luca Coelho The bucket_table_alloc() function was reworked, so update the patch accordingly. It's much simpler now, if !GFP_KERNEL, we just fail (like we used to). This is not a problem because we only use this function with GFP_KERNEL anyway. Signed-off-by: Luca Coelho --- patches/lib-rhashtable.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patches/lib-rhashtable.patch diff --git a/patches/lib-rhashtable.patch b/patches/lib-rhashtable.patch new file mode 100644 index 000000000000..a538d0c83fc7 --- /dev/null +++ b/patches/lib-rhashtable.patch @@ -0,0 +1,14 @@ +diff --git a/compat/lib-rhashtable.c b/compat/lib-rhashtable.c +index 30526afa8343..bee37f2682dd 100644 +--- a/compat/lib-rhashtable.c ++++ b/compat/lib-rhashtable.c +@@ -173,7 +173,8 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht, + int i; + + size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]); +- tbl = kvzalloc(size, gfp); ++ if (gfp == GFP_KERNEL) ++ tbl = vzalloc(size); + + size = nbuckets; +