Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6496466rwn; Tue, 13 Sep 2022 05:16:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sMwi9DmLDc0QIhrQexODKoebT85d6sJlm3NVwks9N05kPcfxPNHQHSP7/SipUmJrZWBKd X-Received: by 2002:a05:6a00:3:b0:53e:5edd:116a with SMTP id h3-20020a056a00000300b0053e5edd116amr32755223pfk.7.1663071383273; Tue, 13 Sep 2022 05:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663071383; cv=none; d=google.com; s=arc-20160816; b=NXrqheWlr+bggcdlg74bHrKw09lnLLBk2UST/yiWnctM5K/wVwb0tXKZXpqjj5yUIR 3BiOuGstKg/kgD8kgfcGpPmt922HJ+d94cnodZzkvC7IgTZEWLeJLeDAERPET+BGDOgk pTy7iWfIrOOruC3lIrVFWgVj1+mlcyLK8g4L9RhzAvcm7KpDL9o8lrP4FzyI0Lc88wKJ YS94us/XQTxOtrMTJYQ/PTZZIGhF5t17ZJvrb9ts/AVDBro9cUWCjhInE5vYzshGAOl+ v87SYuZ0x1QBGXHrN0LZVN/bug3hYppQNbSg4KrJ7/sdUJlvRV5gwW2kVgQbrlqpcjHB psAQ== 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=CDEp2MmoRZErrt4G2e0MwLniS39Twciww8brx80hbZJQhrX8Pk04tR47giMKT2KMbI fXYcKSx/fZmzqI7Vk8qLVOuTj3z86cxMxz1z8HU7k8gsfRBVCNqdYJft1lxOiF2N0cni 7Hcxr0BYcE/q2f/Zy1AqFvygCEIyRTyF24aj947KIg4EG/+JINRlWtK5wDCbRv6DsT8E g7/fhg0KFBczTJtaVlDcmot+lAT/f1sxy90QJrPlOa241kdBa4+GNBOiRnxwzjC1AapQ xB2z1VPDi2CNaK8iAMLoqmsuMw9rjdmhivHMKJ09W24Hr0+xfSsq9ypxyFEB2NAbik1Z Hn0Q== 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 o14-20020a17090ab88e00b002008d0b0838si10496788pjr.178.2022.09.13.05.16.11; Tue, 13 Sep 2022 05:16: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 S231804AbiIMLOC (ORCPT + 99 others); Tue, 13 Sep 2022 07:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231146AbiIMLOA (ORCPT ); Tue, 13 Sep 2022 07:14:00 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 82B195F130 for ; Tue, 13 Sep 2022 04:13:59 -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 A9F011063; Tue, 13 Sep 2022 04:14:05 -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 577973F71A; Tue, 13 Sep 2022 04:13:57 -0700 (PDT) Message-ID: Date: Tue, 13 Sep 2022 16:43:54 +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