From: David Rientjes /proc/pid/clear_refs is only defined in the CONFIG_MMU case, so make sure we don't have any references to clear_refs_smap() in generic procfs code. Signed-off-by: David Rientjes Signed-off-by: David Howells Signed-off-by: Andrew Morton --- fs/proc/base.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN fs/proc/base.c~smaps-only-define-clear_refs-for-config_mmu fs/proc/base.c --- a/fs/proc/base.c~smaps-only-define-clear_refs-for-config_mmu +++ a/fs/proc/base.c @@ -708,6 +708,7 @@ static const struct file_operations proc .write = oom_adjust_write, }; +#ifdef CONFIG_MMU static ssize_t clear_refs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -741,6 +742,7 @@ static ssize_t clear_refs_write(struct f static struct file_operations proc_clear_refs_operations = { .write = clear_refs_write, }; +#endif #ifdef CONFIG_AUDITSYSCALL #define TMPBUFLEN 21 _