[PATCH 1/2] smaps: only define clear_refs for CONFIG_MMU

From: David Howells
Date: Tue May 08 2007 - 16:12:53 EST


From: David Rientjes <rientjes@xxxxxxxxxx>

/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@xxxxxxxxxx>
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

fs/proc/base.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index ec158dd..5602ae4 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -715,6 +715,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)
{
@@ -748,6 +749,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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/