Make autoremove_wake_function -> default_wake_function call inlined. default_wake_function cannot be put as static inline into headers, because reference to it is taken at some places. Signed-off-by: Mikulas Patocka Index: linux-2.6.26-rc5-devel/kernel/sched.c =================================================================== --- linux-2.6.26-rc5-devel.orig/kernel/sched.c 2008-06-19 15:24:14.000000000 +0200 +++ linux-2.6.26-rc5-devel/kernel/sched.c 2008-06-19 20:07:07.000000000 +0200 @@ -4268,13 +4268,23 @@ #endif /* CONFIG_PREEMPT */ -int default_wake_function(wait_queue_t *curr, unsigned mode, int sync, - void *key) +inline int default_wake_function(wait_queue_t *curr, unsigned mode, int sync, + void *key) { return try_to_wake_up(curr->private, mode, sync); } EXPORT_SYMBOL(default_wake_function); +int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) +{ + int ret = default_wake_function(wait, mode, sync, key); + + if (ret) + list_del_init(&wait->task_list); + return ret; +} +EXPORT_SYMBOL(autoremove_wake_function); + /* * The core wakeup function. Non-exclusive wakeups (nr_exclusive == 0) just * wake everything up. If it's an exclusive wakeup (nr_exclusive == small +ve Index: linux-2.6.26-rc5-devel/kernel/wait.c =================================================================== --- linux-2.6.26-rc5-devel.orig/kernel/wait.c 2008-06-19 15:24:15.000000000 +0200 +++ linux-2.6.26-rc5-devel/kernel/wait.c 2008-06-19 20:07:07.000000000 +0200 @@ -127,16 +127,6 @@ } EXPORT_SYMBOL(finish_wait); -int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) -{ - int ret = default_wake_function(wait, mode, sync, key); - - if (ret) - list_del_init(&wait->task_list); - return ret; -} -EXPORT_SYMBOL(autoremove_wake_function); - int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *arg) { struct wait_bit_key *key = arg; Index: linux-2.6.26-rc5-devel/include/linux/wait.h =================================================================== --- linux-2.6.26-rc5-devel.orig/include/linux/wait.h 2008-06-19 20:07:18.000000000 +0200 +++ linux-2.6.26-rc5-devel/include/linux/wait.h 2008-06-19 20:07:28.000000000 +0200 @@ -63,7 +63,7 @@ typedef struct __wait_queue wait_queue_t; typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key); -int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); +inline int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); struct __wait_queue { unsigned int flags;