Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp192108iog; Tue, 28 Jun 2022 20:14:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJwrVaaPJbCgl8oLaUkx2pFLWth1gq0nwiVxAk+6aqqvY6Jk9rtWzcHNJvJUMQHL2rzBLU X-Received: by 2002:a05:6a00:ad0:b0:50a:51b3:1e3d with SMTP id c16-20020a056a000ad000b0050a51b31e3dmr6984550pfl.18.1656472460928; Tue, 28 Jun 2022 20:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656472460; cv=none; d=google.com; s=arc-20160816; b=XPL7/UYL021wH7YAhyipjtPDkOrElWT0tjBX8IZbL/B3LZQjcvzc0WPPbQeRMYvYB2 una6Eym9NejfV1pqYZSVfyBCTE9YLlMp5MUEjEmLf7rY7EPvpfyCANtDbwZpr+namB8B 8DDCKcpjK2m6ElOpXPYhtnYB4VQhYpzffRNJUrE6xshHWpyxr8vl9LTevlAzogWCnZUv R9xV1Emhl2ed+euIIr18uF23/AV5sN6AGvrFyzI7ZglN1sW2v4szCH+Gus6ZSgZMBxJq T6X1KtjZ4lRty8urNumpC78CPnlDMJ7+1Xe1lUcxrpJ2wtoVwQmphfoxwj/PV54Trc+b n1JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=SX5eoRv0kCJpfdHjQo3ijGsTDmNA7diDSdoqvLYrfgw=; b=mD7v4cXot9Vg463sgQH7yGzdE7980o4GnztLYm2Xtm82HnSINyq/zV8d7Y5n0SCSXq t9UJJb973ASr1wUmSlS4FOlFigDDIWN6IiYAgthfsR9jTcLWkWpqL86cHPPEbyLj6zVJ PsKHnKBtADX5yjltBBcD6F7C6V3+Dfofck2QHnv/XojdFA6dYJIGxwpdOFIOr9/DEHji Y9DJvoAQI1uJ6mSTEhPEXQq/GXL3t3Aqxd09zSv44qec5oooWAxSzOluTVM74iQHipG8 2pzwBbP6JTT0kg1XPzeMi+/73TEUSJBViPdjSKCzrznfhKXJQNjD1tRE8POUs9TqTUt5 s0gQ== 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 r18-20020a6560d2000000b003f5e580bb0bsi20279130pgv.53.2022.06.28.20.14.05; Tue, 28 Jun 2022 20:14:20 -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 S229978AbiF2C4J (ORCPT + 99 others); Tue, 28 Jun 2022 22:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbiF2C4I (ORCPT ); Tue, 28 Jun 2022 22:56:08 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40A6C11A25 for ; Tue, 28 Jun 2022 19:56:03 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LXmJx5pyqzkX2q; Wed, 29 Jun 2022 10:54:41 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) 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; Wed, 29 Jun 2022 10:56:01 +0800 Subject: Re: [PATCH -next] mm/memory-failure: fix redefinition of mf_generic_kill_procs To: Zheng Bin , , CC: , , References: <20220628112143.1170473-1-zhengbin13@huawei.com> From: Miaohe Lin Message-ID: <3e3691cc-c29e-78be-eeff-56ecb6753182@huawei.com> Date: Wed, 29 Jun 2022 10:56:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220628112143.1170473-1-zhengbin13@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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,NICE_REPLY_A, 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 On 2022/6/28 19:21, Zheng Bin wrote: > If CONFIG_HUGETLB_PAGE=n, building fails: > > mm/memory-failure.c:1805:19: error: redefinition of ‘mf_generic_kill_procs’ > static inline int mf_generic_kill_procs(unsigned long long pfn, int flags, > ^~~~~~~~~~~~~~~~~~~~~ > mm/memory-failure.c:1564:12: note: previous definition of ‘mf_generic_kill_procs’ was here > static int mf_generic_kill_procs(unsigned long long pfn, int flags, > > This patch fixes that. > > Fixes: 4184e8d7d056 ("mm-factor-helpers-for-memory_failure_dev_pagemap-fix") > Signed-off-by: Zheng Bin Thanks for fixing this. mf_generic_kill_procs shouldn't depend on CONFIG_HUGETLB_PAGE. Reviewed-by: Miaohe Lin BTW: It seems there is a mess between CONFIG_HUGETLB_PAGE and CONFIG_FS_DAX. It's better to fix it later. > --- > mm/memory-failure.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index 001fead45f30..c9931c676335 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1801,13 +1801,6 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb > } > > #else > - > -static inline int mf_generic_kill_procs(unsigned long long pfn, int flags, > - struct dev_pagemap *pgmap) > -{ > - return 0; > -} > - > static inline int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb) > { > return 0; > -- > 2.31.1 > > . >