From patchwork Fri Sep 16 07:22:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12978216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EF05C6FA82 for ; Fri, 16 Sep 2022 07:24:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 441DD8000F; Fri, 16 Sep 2022 03:23:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 376558000C; Fri, 16 Sep 2022 03:23:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 153018000E; Fri, 16 Sep 2022 03:23:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 04EEA8000C for ; Fri, 16 Sep 2022 03:23:48 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D7CDEA1AC4 for ; Fri, 16 Sep 2022 07:23:47 +0000 (UTC) X-FDA: 79917108894.21.C57E681 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf03.hostedemail.com (Postfix) with ESMTP id 3A478200A1 for ; Fri, 16 Sep 2022 07:23:47 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MTQTm0zvKznVKV; Fri, 16 Sep 2022 15:21:00 +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.31; Fri, 16 Sep 2022 15:23:43 +0800 From: Miaohe Lin To: , , , CC: , , , Subject: [PATCH v2 15/16] mm/page_alloc: remove obsolete gfpflags_normal_context() Date: Fri, 16 Sep 2022 15:22:56 +0800 Message-ID: <20220916072257.9639-16-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220916072257.9639-1-linmiaohe@huawei.com> References: <20220916072257.9639-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663313027; a=rsa-sha256; cv=none; b=lmSKgLMpcpwan0/HbkwylMcKzl7jBSNzA88+hsrWfiW31I/0WSBEB0RwuaBkUu3rNKSbJj o3QSsHuxFO33Qii2gOUWhvSWV8kNFE1dQ8mPe1KqPlNijHRcb6sqfGz7nphbb+r2yw+Hg/ MNAA/ZxoyPmOC/soSSW8C4UTSFc7j58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663313027; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MEfrSEwsjO2e2CQ+DkhsO/Tn5RXErYne1/maYe3hAVQ=; b=OrY8Ps9zlaM+Evkgz9helDzWZBRqDlyGJRDTZ1BPZsXYzMoerGhT7AfxhupGc55eCxaIHw gDYm3K+J3EOn9tKuCg5F6LXpuIVtKkW6VeY4wdvTriSH3KDHW9MBOC9TNDqG9gSYaMSaww nFXhWHXW7+2M1GYIOIfGYr6rHISYH78= X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 3A478200A1 Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Stat-Signature: dm3hkn8ags1xwtcauw3z16g56nepuoxy X-HE-Tag: 1663313027-155668 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Reviewed-by: Oscar Salvador --- 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