提交 146732ce 编写于 作者: J Josh Triplett 提交者: Linus Torvalds

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: NJosh Triplett <josh@joshtriplett.org>
Acked-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6d2488f6
...@@ -10,7 +10,7 @@ obj-y := open.o read_write.o file_table.o super.o \ ...@@ -10,7 +10,7 @@ obj-y := open.o read_write.o file_table.o super.o \
ioctl.o readdir.o select.o fifo.o dcache.o inode.o \ ioctl.o readdir.o select.o fifo.o dcache.o inode.o \
attr.o bad_inode.o file.o filesystems.o namespace.o \ attr.o bad_inode.o file.o filesystems.o namespace.o \
seq_file.o xattr.o libfs.o fs-writeback.o \ seq_file.o xattr.o libfs.o fs-writeback.o \
pnode.o drop_caches.o splice.o sync.o utimes.o \ pnode.o splice.o sync.o utimes.o \
stack.o fs_struct.o statfs.o stack.o fs_struct.o statfs.o
ifeq ($(CONFIG_BLOCK),y) ifeq ($(CONFIG_BLOCK),y)
...@@ -49,6 +49,7 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o xattr_acl.o ...@@ -49,6 +49,7 @@ obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o xattr_acl.o
obj-$(CONFIG_NFS_COMMON) += nfs_common/ obj-$(CONFIG_NFS_COMMON) += nfs_common/
obj-$(CONFIG_GENERIC_ACL) += generic_acl.o obj-$(CONFIG_GENERIC_ACL) += generic_acl.o
obj-$(CONFIG_COREDUMP) += coredump.o obj-$(CONFIG_COREDUMP) += coredump.o
obj-$(CONFIG_SYSCTL) += drop_caches.o
obj-$(CONFIG_FHANDLE) += fhandle.o obj-$(CONFIG_FHANDLE) += fhandle.o
......
...@@ -1731,8 +1731,12 @@ int in_gate_area_no_mm(unsigned long addr); ...@@ -1731,8 +1731,12 @@ int in_gate_area_no_mm(unsigned long addr);
#define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);})
#endif /* __HAVE_ARCH_GATE_AREA */ #endif /* __HAVE_ARCH_GATE_AREA */
#ifdef CONFIG_SYSCTL
extern int sysctl_drop_caches;
int drop_caches_sysctl_handler(struct ctl_table *, int, int drop_caches_sysctl_handler(struct ctl_table *, int,
void __user *, size_t *, loff_t *); void __user *, size_t *, loff_t *);
#endif
unsigned long shrink_slab(struct shrink_control *shrink, unsigned long shrink_slab(struct shrink_control *shrink,
unsigned long nr_pages_scanned, unsigned long nr_pages_scanned,
unsigned long lru_pages); unsigned long lru_pages);
......
...@@ -106,7 +106,6 @@ extern unsigned int core_pipe_limit; ...@@ -106,7 +106,6 @@ extern unsigned int core_pipe_limit;
#endif #endif
extern int pid_max; extern int pid_max;
extern int pid_max_min, pid_max_max; extern int pid_max_min, pid_max_max;
extern int sysctl_drop_caches;
extern int percpu_pagelist_fraction; extern int percpu_pagelist_fraction;
extern int compat_log; extern int compat_log;
extern int latencytop_enabled; extern int latencytop_enabled;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册