Index: linux-2.6.13-ck2test/include/linux/swap.h =================================================================== --- linux-2.6.13-ck2test.orig/include/linux/swap.h 2005-09-07 20:25:40.000000000 +1000 +++ linux-2.6.13-ck2test/include/linux/swap.h 2005-09-07 20:35:12.000000000 +1000 @@ -186,6 +186,32 @@ extern int shmem_unuse(swp_entry_t entry extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); +#ifdef CONFIG_SWAP_PREFETCH +/* mm/swap_prefetch.c */ +extern void prepare_prefetch(void); +extern void add_to_swapped_list(unsigned long index); +extern void remove_from_swapped_list(unsigned long index); +extern void delay_prefetch(void); + +#else /* CONFIG_SWAP_PREFETCH */ +static inline void add_to_swapped_list(unsigned long index) +{ +} + +static inline void prepare_prefetch(void) +{ +} + +static inline void remove_from_swapped_list(unsigned long index) +{ +} + +static inline void delay_prefetch(void) +{ +} + +#endif /* CONFIG_SWAP_PREFETCH */ + #ifdef CONFIG_SWAP /* linux/mm/page_io.c */ extern int swap_readpage(struct file *, struct page *); @@ -249,32 +275,6 @@ static inline void put_swap_token(struct __put_swap_token(mm); } -#ifdef CONFIG_SWAP_PREFETCH -/* mm/swap_prefetch.c */ -extern void prepare_prefetch(void); -extern void add_to_swapped_list(unsigned long index); -extern void remove_from_swapped_list(unsigned long index); -extern void delay_prefetch(void); - -#else /* CONFIG_SWAP_PREFETCH */ -static inline void add_to_swapped_list(unsigned long index) -{ -} - -static inline void prepare_prefetch(void) -{ -} - -static inline void remove_from_swapped_list(unsigned long index) -{ -} - -static inline void delay_prefetch(void) -{ -} - -#endif /* CONFIG_SWAP_PREFETCH */ - #else /* CONFIG_SWAP */ #define total_swap_pages 0