
From: Christopher Hoover <ch@murgatroid.com>

Here's a patch to drop some more text/data/bss out of 2.5.  This time
the ``victim'' is eventpollfs (epoll).



 fs/Makefile               |    4 +++-
 include/linux/eventpoll.h |    9 +++++++++
 init/Kconfig              |    3 +++
 kernel/sys.c              |    3 +++
 4 files changed, 18 insertions(+), 1 deletion(-)

diff -puN fs/Makefile~CONFIG_EPOLL fs/Makefile
--- 25/fs/Makefile~CONFIG_EPOLL	2003-05-14 23:18:19.000000000 -0700
+++ 25-akpm/fs/Makefile	2003-05-14 23:18:19.000000000 -0700
@@ -10,7 +10,9 @@ obj-y :=	open.o read_write.o file_table.
 		namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \
 		dcache.o inode.o attr.o bad_inode.o file.o dnotify.o \
 		filesystems.o namespace.o seq_file.o xattr.o libfs.o \
-		fs-writeback.o mpage.o direct-io.o aio.o eventpoll.o
+		fs-writeback.o mpage.o direct-io.o aio.o
+
+obj-$(CONFIG_EPOLL)	+= eventpoll.o
 
 obj-$(CONFIG_COMPAT) += compat.o
 
diff -puN include/linux/eventpoll.h~CONFIG_EPOLL include/linux/eventpoll.h
--- 25/include/linux/eventpoll.h~CONFIG_EPOLL	2003-05-14 23:18:19.000000000 -0700
+++ 25-akpm/include/linux/eventpoll.h	2003-05-14 23:18:19.000000000 -0700
@@ -40,12 +40,21 @@ asmlinkage long sys_epoll_ctl(int epfd, 
 asmlinkage long sys_epoll_wait(int epfd, struct epoll_event *events, int maxevents,
 			       int timeout);
 
+#ifdef CONFIG_EPOLL
+
 /* Used to initialize the epoll bits inside the "struct file" */
 void eventpoll_init_file(struct file *file);
 
 /* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */
 void eventpoll_release(struct file *file);
 
+#else
+
+static inline void eventpoll_init_file(struct file *file) {}
+static inline void eventpoll_release(struct file *file) {}
+
+#endif
+
 #endif /* #ifdef __KERNEL__ */
 
 #endif /* #ifndef _LINUX_EVENTPOLL_H */
diff -puN init/Kconfig~CONFIG_EPOLL init/Kconfig
--- 25/init/Kconfig~CONFIG_EPOLL	2003-05-14 23:18:19.000000000 -0700
+++ 25-akpm/init/Kconfig	2003-05-14 23:18:43.000000000 -0700
@@ -190,4 +190,7 @@ config FUTEX
 	bool
 	default y
 
+config EPOLL
+	bool
+	default y
 
diff -puN kernel/sys.c~CONFIG_EPOLL kernel/sys.c
--- 25/kernel/sys.c~CONFIG_EPOLL	2003-05-14 23:18:19.000000000 -0700
+++ 25-akpm/kernel/sys.c	2003-05-14 23:18:19.000000000 -0700
@@ -230,6 +230,9 @@ cond_syscall(sys_recvmsg)
 cond_syscall(sys_socketcall)
 cond_syscall(sys_futex)
 cond_syscall(compat_sys_futex)
+cond_syscall(sys_epoll_create)
+cond_syscall(sys_epoll_ctl)
+cond_syscall(sys_epoll_wait)
 
 static int set_one_prio(struct task_struct *p, int niceval, int error)
 {

_
