diff options
author | Josh Triplett <josh@joshtriplett.org> | 2013-04-29 18:07:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:54:33 -0400 |
commit | 146732ce104ddfed3d4d82722c0b336074016b92 (patch) | |
tree | 07185bc6ff143cc669cc9e0a197a3adf0c13004a | |
parent | 6d2488f64a240191f0733c1f32d73607916b01b7 (diff) |
fs: don't compile in drop_caches.c when CONFIG_SYSCTL=n
drop_caches.c provides code only invokable via sysctl, so don't compile it
in when CONFIG_SYSCTL=n.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/Makefile | 3 | ||||
-rw-r--r-- | include/linux/mm.h | 4 | ||||
-rw-r--r-- | kernel/sysctl.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/fs/Makefile b/fs/Makefile index 9d53192236fc..3b2c76759ec9 100644 --- a/fs/Makefile +++ b/fs/Makefile | |||
@@ -10,7 +10,7 @@ obj-y := open.o read_write.o file_table.o super.o \ | |||
10 | ioctl.o readdir.o select.o fifo.o dcache.o inode.o \ | 10 | ioctl.o readdir.o select.o fifo.o dcache.o inode.o \ |
11 | attr.o bad_inode.o file.o filesystems.o namespace.o \ | 11 | attr.o bad_inode.o file.o filesystems.o namespace.o \ |
12 | seq_file.o xattr.o libfs.o fs-writeback.o \ | 12 | seq_file.o xattr.o libfs.o fs-writeback.o \ |
13 | pnode.o drop_caches.o splice.o sync.o utimes.o \ | 13 | pnode.o splice.o sync.o utimes.o \ |
14 | stack.o fs_struct.o statfs.o | 14 | stack.o fs_struct.o statfs.o |
15 | 15 | ||
16 | ifeq ($(CONFIG_BLOCK),y) | 16 | ifeq ($(CONFIG_BLOCK),y) |
@@ -49,6 +49,7 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o xattr_acl.o | |||
49 | obj-$(CONFIG_NFS_COMMON) += nfs_common/ | 49 | obj-$(CONFIG_NFS_COMMON) += nfs_common/ |
50 | obj-$(CONFIG_GENERIC_ACL) += generic_acl.o | 50 | obj-$(CONFIG_GENERIC_ACL) += generic_acl.o |
51 | obj-$(CONFIG_COREDUMP) += coredump.o | 51 | obj-$(CONFIG_COREDUMP) += coredump.o |
52 | obj-$(CONFIG_SYSCTL) += drop_caches.o | ||
52 | 53 | ||
53 | obj-$(CONFIG_FHANDLE) += fhandle.o | 54 | obj-$(CONFIG_FHANDLE) += fhandle.o |
54 | 55 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 43b70d5f8201..98a44376e4f3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1731,8 +1731,12 @@ int in_gate_area_no_mm(unsigned long addr); | |||
1731 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) | 1731 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) |
1732 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1732 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1733 | 1733 | ||
1734 | #ifdef CONFIG_SYSCTL | ||
1735 | extern int sysctl_drop_caches; | ||
1734 | int drop_caches_sysctl_handler(struct ctl_table *, int, | 1736 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
1735 | void __user *, size_t *, loff_t *); | 1737 | void __user *, size_t *, loff_t *); |
1738 | #endif | ||
1739 | |||
1736 | unsigned long shrink_slab(struct shrink_control *shrink, | 1740 | unsigned long shrink_slab(struct shrink_control *shrink, |
1737 | unsigned long nr_pages_scanned, | 1741 | unsigned long nr_pages_scanned, |
1738 | unsigned long lru_pages); | 1742 | unsigned long lru_pages); |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index afc1dc60f3f8..3dadde52253c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -106,7 +106,6 @@ extern unsigned int core_pipe_limit; | |||
106 | #endif | 106 | #endif |
107 | extern int pid_max; | 107 | extern int pid_max; |
108 | extern int pid_max_min, pid_max_max; | 108 | extern int pid_max_min, pid_max_max; |
109 | extern int sysctl_drop_caches; | ||
110 | extern int percpu_pagelist_fraction; | 109 | extern int percpu_pagelist_fraction; |
111 | extern int compat_log; | 110 | extern int compat_log; |
112 | extern int latencytop_enabled; | 111 | extern int latencytop_enabled; |