From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF2A0C43334 for ; Wed, 29 Jun 2022 02:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbiF2C4J (ORCPT ); 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 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 > > . >