linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Hugh Dickins <hughd@google.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Christoph Lameter <cl@linux.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP
Date: Mon, 16 May 2016 16:23:33 +0200	[thread overview]
Message-ID: <20160516142332.GL23146@dhcp22.suse.cz> (raw)
In-Reply-To: <1462978517-2972312-1-git-send-email-arnd@arndb.de>

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 <mhocko@suse.com>
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 <arnd@arndb.de>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
 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

  parent reply	other threads:[~2016-05-16 14:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 14:54 [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Arnd Bergmann
2016-05-11 15:32 ` Christoph Lameter
2016-05-16  7:31   ` Michal Hocko
2016-05-17  5:31   ` Do not build vmstat_refresh if there is no procfs support kbuild test robot
2016-05-16  7:37 ` [PATCH] mm: unhide vmstat_text definition for CONFIG_SMP Michal Hocko
2016-05-16 13:54   ` Christoph Lameter
2016-05-16 14:23 ` Michal Hocko [this message]
2016-05-16 22:36   ` Andrew Morton
2016-05-17  7:05     ` Michal Hocko
2016-05-18  1:02       ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160516142332.GL23146@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cl@linux.com \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).