Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1733900rwn; Fri, 9 Sep 2022 03:17:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR6q6nnkoAllHcP7gOOnDyUNjfl57E1p46E1pPzwJQs0cNiakyWd+oe08Bkq0qhZndT800dD X-Received: by 2002:a05:6512:33c2:b0:498:f38b:bd76 with SMTP id d2-20020a05651233c200b00498f38bbd76mr1808255lfg.590.1662718648037; Fri, 09 Sep 2022 03:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662718648; cv=none; d=google.com; s=arc-20160816; b=CjdcxBdVveOFfRhmL3jdBN7GlcqIWkVykqf2YOlDYQ22MABEbL7ZHyWVUrjJxC8wrp qrGe3kH8of5TOfH7VfQaY84Q3KNeLxWsulhtFueK14WAoffp5oo5ZS+VLUl2WJJJd6op cSrDALlvj/k0VqDLHUY1Qz5wJ3m63JOtYUBK/RQduux4m6/Zdm4ZzNzRGbE4X2Dkjyz5 +ipdgS9FzjyGuAn/88rnoXsQkm9hblAhrmuyGag3ppzRhR2j5xcsEVA2itX/zCjVkloG DPt45agWVJlXgNkg/mg9dS5ns19kbbIFOd6yHjzGPbi3D7JBIC+FS8oEV43HUflAbIDf fxTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BUMlZw6v2VQHO3kIXYxVT43Kt053GgvJnVheJx67OSE=; b=GYVklImuZ/21kHTbFNr68i4CWbXfXodi1freiHtNV8gwtBgKF1ntCp6m4rbY/xeFe9 rOCqRF2T2EmkwvddCjEpU9w6F1BExL7uBgxG3FXvWKADPY1TqRA256KQ/5opXqW7zc11 jsZs5Z89cVl9qIbCc1Vbp4Sx09XCpr9QkDQxaN/78PK0syLjILMvkHg6FGP89Z5qQjoy UjeDqDBeBTSEfo2cPbnJM9hkEiQu2mDesphxP25P81ceHJMsk+Wl0pnWq5kQUs80vdTk BMUzj0j7lyHP317htl+0Rw+oXnTN8r+GFqVFxO9yShNqkItL0EIGm2gSBdZXkXpgkKXA rWnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs19-20020a05651c195300b0026ad31746cesi54248ljb.616.2022.09.09.03.16.58; Fri, 09 Sep 2022 03:17:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232280AbiIIJ2k (ORCPT + 99 others); Fri, 9 Sep 2022 05:28:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbiIIJ07 (ORCPT ); Fri, 9 Sep 2022 05:26:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57497D5737 for ; Fri, 9 Sep 2022 02:25:34 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MP9VV3gN1zmVLC; Fri, 9 Sep 2022 17:21:54 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 9 Sep 2022 17:25:32 +0800 From: Miaohe Lin To: CC: , , , , Subject: [PATCH 15/16] mm/page_alloc: remove obsolete gfpflags_normal_context() Date: Fri, 9 Sep 2022 17:24:50 +0800 Message-ID: <20220909092451.24883-16-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220909092451.24883-1-linmiaohe@huawei.com> References: <20220909092451.24883-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit dacb5d8875cc ("tcp: fix page frag corruption on page fault"), there's no caller of gfpflags_normal_context(). Remove it as this helper is strictly tied to the sk page frag usage and there won't be other user in the future. Signed-off-by: Miaohe Lin --- include/linux/gfp.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index ea6cb9399152..ef4aea3b356e 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -36,29 +36,6 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) return !!(gfp_flags & __GFP_DIRECT_RECLAIM); } -/** - * gfpflags_normal_context - is gfp_flags a normal sleepable context? - * @gfp_flags: gfp_flags to test - * - * Test whether @gfp_flags indicates that the allocation is from the - * %current context and allowed to sleep. - * - * An allocation being allowed to block doesn't mean it owns the %current - * context. When direct reclaim path tries to allocate memory, the - * allocation context is nested inside whatever %current was doing at the - * time of the original allocation. The nested allocation may be allowed - * to block but modifying anything %current owns can corrupt the outer - * context's expectations. - * - * %true result from this function indicates that the allocation context - * can sleep and use anything that's associated with %current. - */ -static inline bool gfpflags_normal_context(const gfp_t gfp_flags) -{ - return (gfp_flags & (__GFP_DIRECT_RECLAIM | __GFP_MEMALLOC)) == - __GFP_DIRECT_RECLAIM; -} - #ifdef CONFIG_HIGHMEM #define OPT_ZONE_HIGHMEM ZONE_HIGHMEM #else -- 2.23.0