summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-17 20:55:06 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-17 20:55:06 -0700
commit3df9aaf34e68c9256b08d02ca65ced12bf9e8d9e (patch)
treef05bfe114893f8679f878bbb747c9c0077c3911c /include
parentc4d92e6b147b133848e8d89a734efdd2c3302d14 (diff)
[PATCH] rmap: swap_unplug page
From: Hugh Dickins <hugh@veritas.com> Good example of "swapper_space considered harmful": swap_unplug_io_fn was originally designed for calling via swapper_space.backing_dev_info; but that way it loses track of which device is to be unplugged, so had to unplug all swap devices. But now sync_page tests SwapCache anyway, can call swap_unplug_io_fn with page, which leads direct to the device. Reverted -mc4's CONFIG_SWAP=n fix, just add another NOTHING for it. Reverted -mc3's editorial adjustments to swap_backing_dev_info and swapper_space initializations: they document the few fields which are actually used now, as comment above them says (sound of slapped wrist).
Diffstat (limited to 'include')
-rw-r--r--include/linux/swap.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index f911d8afb8a5..5c5a79729041 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -181,8 +181,6 @@ extern int vm_swappiness;
extern int shmem_unuse(swp_entry_t entry, struct page *page);
#endif /* CONFIG_MMU */
-extern void swap_unplug_io_fn(struct backing_dev_info *);
-
#ifdef CONFIG_SWAP
/* linux/mm/page_io.c */
extern int swap_readpage(struct file *, struct page *);
@@ -218,7 +216,7 @@ extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t);
extern struct swap_info_struct *get_swap_info_struct(unsigned);
extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
-struct backing_dev_info;
+extern void swap_unplug_io_fn(struct page *);
extern struct swap_list_t swap_list;
extern spinlock_t swaplock;
@@ -252,6 +250,7 @@ extern spinlock_t swaplock;
#define move_from_swap_cache(p, i, m) 1
#define __delete_from_swap_cache(p) /*NOTHING*/
#define delete_from_swap_cache(p) /*NOTHING*/
+#define swap_unplug_io_fn(p) /*NOTHING*/
static inline int remove_exclusive_swap_page(struct page *p)
{