From patchwork Fri Sep 9 09:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12971383 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 B5505ECAAD3 for ; Fri, 9 Sep 2022 09:25:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ADAA68D000E; Fri, 9 Sep 2022 05:25:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EDC58D000C; Fri, 9 Sep 2022 05:25:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 818C380007; Fri, 9 Sep 2022 05:25:35 -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 5CA138D000E for ; Fri, 9 Sep 2022 05:25:35 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 30BE9160B35 for ; Fri, 9 Sep 2022 09:25:35 +0000 (UTC) X-FDA: 79892014230.25.FD47DF9 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf10.hostedemail.com (Postfix) with ESMTP id A22C6C0072 for ; Fri, 9 Sep 2022 09:25:34 +0000 (UTC) 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 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662715534; a=rsa-sha256; cv=none; b=VLO5b0qC20gQf4s3mnEm7joPgNtLNYXEbiUS9WcA0ZPV7zLSoSLp9KQxXtyJot7BNHslel VjUmjFK5z2NjGiPmlLJcCPDS2khvVPBt2btaJM5lHpLRiEfWbqor1kKo5qTIVNvdi8/x6u O5f1RyMKBfZN45XrKGBDa2+9JS/R9tc= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662715534; 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=BUMlZw6v2VQHO3kIXYxVT43Kt053GgvJnVheJx67OSE=; b=szcJYuoa4cUEl/6MpY75vnu7ZseZh55LrWP9bnPKKmlF670ezDgpHXS4+bn1wZDZEXX0ui H+mNjGvnNxQbjzZJyw+PafZg7y1b95Wf1CedeY0K+wHeVJtCTIEnuFIY/Na6BHCD+mupk7 Cca0kq8SgH7ooA3c6lt6F7SAbV0GSZk= Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Stat-Signature: c4ph45fpgm1h3ajujzjwom45c3zfnykf X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A22C6C0072 X-HE-Tag: 1662715534-313336 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: 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