Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6465988rwn; Tue, 13 Sep 2022 04:52:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR77GD9tMvcsj5VxkNm4zwKIZ7mVeuUbWTETwrudlxpDuUNxQkdT8OZv8CBjsppF0lD2GDDg X-Received: by 2002:a17:907:720e:b0:77d:2649:188b with SMTP id dr14-20020a170907720e00b0077d2649188bmr6927666ejc.307.1663069943999; Tue, 13 Sep 2022 04:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663069943; cv=none; d=google.com; s=arc-20160816; b=sFynDb6yQwNpAGb7KYfhEo1WI8Mx0LcleIGshxsMGxYJSFq3VXIYLD7BTtohpH/yAO z4LDpRJJ0x3eOSF95p6Gkwr+7XushIIl+/Mhsp61F8VH4LOOFCZDV7m69MqAQMATAVd8 TN8GrLqV+R+wd1y4/4FItW0yYm4krl8nEyVNppHsL0vYb8SI9htmZepYuWKDHWAsRSta lqflXiBK5AzNK2p9T0oB4mREtJziK5Hqes5FNEl40rTQMprrDAuVJICHgZEGofsTPoh5 98cm0NQvCmRBZCIJcSF1o/pHnjfhe+amCst0M/XLXtE6Q/q1dN9JtoTvDrlS7auobxN9 e7Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=GrkGufE+bQISIEdBqjmmw2VQNq2FitkVOb+phHuxzf4=; b=jjqnfUX7/TUM+JHsYtdKJ89HSPkmmpLKyfx/6lrMWXPKjhGMfAi/Bh2qa0FfuYqI2M 8VfHTJKg7tNWye3lJVBFwnFr7tuMMpQ54hCT5y2yh73GAlUlfLSwV675bnL/DYPm27os BNq8OVJxqSd4qqvS+hSgW51iP2PXQQk2hC8FCOq/VuG7QFoeWN0gWxlR1bfw6tXjMAlf OCn9QTbVs50R0xGHUlTm6eSODoV9w/5XlkdttjVldV7PfUwDQ4Rgg4+oqH9ZraMfOxiB Ic+97F20d6XnhiOngbxQTT3n8eBJkwi3GpuSXkm41RfEWoCuHQhgCaeOPX1Miu+BfBXD Z7mQ== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a056402195500b00447a73226a8si7933768edz.612.2022.09.13.04.51.57; Tue, 13 Sep 2022 04:52:23 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231279AbiIMLMe (ORCPT + 99 others); Tue, 13 Sep 2022 07:12:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231358AbiIMLMb (ORCPT ); Tue, 13 Sep 2022 07:12:31 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6438852088 for ; Tue, 13 Sep 2022 04:12:30 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8C31C1063; Tue, 13 Sep 2022 04:12:36 -0700 (PDT) Received: from [10.163.58.193] (unknown [10.163.58.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A3403F71A; Tue, 13 Sep 2022 04:12:27 -0700 (PDT) Message-ID: Date: Tue, 13 Sep 2022 16:42:24 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 15/16] mm/page_alloc: remove obsolete gfpflags_normal_context() Content-Language: en-US To: Miaohe Lin , akpm@linux-foundation.org Cc: david@redhat.com, osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-16-linmiaohe@huawei.com> From: Anshuman Khandual In-Reply-To: <20220909092451.24883-16-linmiaohe@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 On 9/9/22 14:54, Miaohe Lin wrote: > 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: Anshuman Khandual > --- > 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