From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754311AbcEPOXi (ORCPT ); Mon, 16 May 2016 10:23:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34664 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754272AbcEPOXf (ORCPT ); Mon, 16 May 2016 10:23:35 -0400 Date: Mon, 16 May 2016 16:23:33 +0200 From: Michal Hocko To: Andrew Morton Cc: Arnd Bergmann , Hugh Dickins , Vlastimil Babka , Christoph Lameter , Mel Gorman , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Message-ID: <20160516142332.GL23146@dhcp22.suse.cz> References: <1462978517-2972312-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462978517-2972312-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew, I think that the following is more straightforward fix and should be folded in to the patch which has introduced vmstat_refresh. --- >>From b8dd18fb7df040e1bfe61aadde1d903589de15e4 Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Mon, 16 May 2016 16:19:53 +0200 Subject: [PATCH] mmotm: mm-proc-sys-vm-stat_refresh-to-force-vmstat-update-fix Arnd has reported: In randconfig builds with sysfs, procfs and numa all disabled, but SMP enabled, we now get a link error in the newly introduced vmstat_refresh function: mm/built-in.o: In function `vmstat_refresh': :(.text+0x15c78): undefined reference to `vmstat_text' vmstat_refresh is proc_fs specific so there is no reason to define it when !CONFIG_PROC_FS. Reported-by: Arnd Bergmann Acked-by: Christoph Lameter Signed-off-by: Michal Hocko --- mm/vmstat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index 57a24e919907..c759b526287b 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1370,6 +1370,7 @@ static void refresh_vm_stats(struct work_struct *work) refresh_cpu_vm_stats(true); } +#ifdef CONFIG_PROC_FS int vmstat_refresh(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { @@ -1422,6 +1423,7 @@ int vmstat_refresh(struct ctl_table *table, int write, *lenp = 0; return 0; } +#endif static void vmstat_update(struct work_struct *w) { -- 2.8.1 -- Michal Hocko SUSE Labs