Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

smaps: only define clear_refs for CONFIG_MMU

/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 <rientjes@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Rientjes and committed by
Linus Torvalds
4b8df891 7e81ab9d

+2
+2
fs/proc/base.c
··· 708 708 .write = oom_adjust_write, 709 709 }; 710 710 711 + #ifdef CONFIG_MMU 711 712 static ssize_t clear_refs_write(struct file *file, const char __user *buf, 712 713 size_t count, loff_t *ppos) 713 714 { ··· 742 741 static struct file_operations proc_clear_refs_operations = { 743 742 .write = clear_refs_write, 744 743 }; 744 + #endif 745 745 746 746 #ifdef CONFIG_AUDITSYSCALL 747 747 #define TMPBUFLEN 21