aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/Makefile3
-rw-r--r--include/linux/aio.h9
-rw-r--r--init/Kconfig8
-rw-r--r--kernel/sys_ni.c5
-rw-r--r--kernel/sysctl.c2
5 files changed, 26 insertions, 1 deletions
diff --git a/fs/Makefile b/fs/Makefile
index b6f27dc26b72..d0c69f57e5bf 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -8,7 +8,7 @@
8obj-y := open.o read_write.o file_table.o super.o \ 8obj-y := open.o read_write.o file_table.o super.o \
9 char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \ 9 char_dev.o stat.o exec.o pipe.o namei.o fcntl.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 aio.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 drop_caches.o splice.o sync.o utimes.o \
14 stack.o 14 stack.o
@@ -27,6 +27,7 @@ obj-$(CONFIG_ANON_INODES) += anon_inodes.o
27obj-$(CONFIG_SIGNALFD) += signalfd.o 27obj-$(CONFIG_SIGNALFD) += signalfd.o
28obj-$(CONFIG_TIMERFD) += timerfd.o 28obj-$(CONFIG_TIMERFD) += timerfd.o
29obj-$(CONFIG_EVENTFD) += eventfd.o 29obj-$(CONFIG_EVENTFD) += eventfd.o
30obj-$(CONFIG_AIO) += aio.o
30obj-$(CONFIG_FILE_LOCKING) += locks.o 31obj-$(CONFIG_FILE_LOCKING) += locks.o
31obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o 32obj-$(CONFIG_COMPAT) += compat.o compat_ioctl.o
32 33
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 09b276c35227..f6b8cf99b596 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -204,12 +204,21 @@ struct kioctx {
204/* prototypes */ 204/* prototypes */
205extern unsigned aio_max_size; 205extern unsigned aio_max_size;
206 206
207#ifdef CONFIG_AIO
207extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); 208extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
208extern int aio_put_req(struct kiocb *iocb); 209extern int aio_put_req(struct kiocb *iocb);
209extern void kick_iocb(struct kiocb *iocb); 210extern void kick_iocb(struct kiocb *iocb);
210extern int aio_complete(struct kiocb *iocb, long res, long res2); 211extern int aio_complete(struct kiocb *iocb, long res, long res2);
211struct mm_struct; 212struct mm_struct;
212extern void exit_aio(struct mm_struct *mm); 213extern void exit_aio(struct mm_struct *mm);
214#else
215static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; }
216static inline int aio_put_req(struct kiocb *iocb) { return 0; }
217static inline void kick_iocb(struct kiocb *iocb) { }
218static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; }
219struct mm_struct;
220static inline void exit_aio(struct mm_struct *mm) { }
221#endif /* CONFIG_AIO */
213 222
214#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait) 223#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
215 224
diff --git a/init/Kconfig b/init/Kconfig
index 8a8e2d00c40e..5ceff3249a2d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -713,6 +713,14 @@ config SHMEM
713 option replaces shmem and tmpfs with the much simpler ramfs code, 713 option replaces shmem and tmpfs with the much simpler ramfs code,
714 which may be appropriate on small systems without swap. 714 which may be appropriate on small systems without swap.
715 715
716config AIO
717 bool "Enable AIO support" if EMBEDDED
718 default y
719 help
720 This option enables POSIX asynchronous I/O which may by used
721 by some high performance threaded applications. Disabling
722 this option saves about 7k.
723
716config VM_EVENT_COUNTERS 724config VM_EVENT_COUNTERS
717 default y 725 default y
718 bool "Enable VM event counters for /proc/vmstat" if EMBEDDED 726 bool "Enable VM event counters for /proc/vmstat" if EMBEDDED
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 503d8d4eb80a..a77b27b11b04 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -126,6 +126,11 @@ cond_syscall(sys_vm86);
126cond_syscall(compat_sys_ipc); 126cond_syscall(compat_sys_ipc);
127cond_syscall(compat_sys_sysctl); 127cond_syscall(compat_sys_sysctl);
128cond_syscall(sys_flock); 128cond_syscall(sys_flock);
129cond_syscall(sys_io_setup);
130cond_syscall(sys_io_destroy);
131cond_syscall(sys_io_submit);
132cond_syscall(sys_io_cancel);
133cond_syscall(sys_io_getevents);
129 134
130/* arch-specific weak syscall entries */ 135/* arch-specific weak syscall entries */
131cond_syscall(sys_pciconfig_read); 136cond_syscall(sys_pciconfig_read);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 9792c315676a..617d41e4d6a0 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1281,6 +1281,7 @@ static struct ctl_table fs_table[] = {
1281 .extra2 = &two, 1281 .extra2 = &two,
1282 }, 1282 },
1283#endif 1283#endif
1284#ifdef CONFIG_AIO
1284 { 1285 {
1285 .procname = "aio-nr", 1286 .procname = "aio-nr",
1286 .data = &aio_nr, 1287 .data = &aio_nr,
@@ -1295,6 +1296,7 @@ static struct ctl_table fs_table[] = {
1295 .mode = 0644, 1296 .mode = 0644,
1296 .proc_handler = &proc_doulongvec_minmax, 1297 .proc_handler = &proc_doulongvec_minmax,
1297 }, 1298 },
1299#endif /* CONFIG_AIO */
1298#ifdef CONFIG_INOTIFY_USER 1300#ifdef CONFIG_INOTIFY_USER
1299 { 1301 {
1300 .ctl_name = FS_INOTIFY, 1302 .ctl_name = FS_INOTIFY,