From: David Rientjes Date: Wed, 9 May 2007 03:27:01 +0000 (-0700) Subject: smaps: only define clear_refs for CONFIG_MMU X-Git-Tag: v2.6.22-rc1~341 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b8df8915a6980f476e1fa8f4d156e36cb63bf76;p=linux-2.6 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 Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/base.c b/fs/proc/base.c index 3c41149dea..a5fa1fdafc 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -708,6 +708,7 @@ static const struct file_operations proc_oom_adjust_operations = { .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 file *file, const char __user *buf, static struct file_operations proc_clear_refs_operations = { .write = clear_refs_write, }; +#endif #ifdef CONFIG_AUDITSYSCALL #define TMPBUFLEN 21