-/*
- * Caller holds swap_bdevs_sem
- */
-static void install_swap_bdev(struct block_device *bdev)
-{
- int i;
-
- for (i = 0; i < MAX_SWAPFILES; i++) {
- if (swap_bdevs[i] == NULL) {
- swap_bdevs[i] = bdev;
- return;
- }
- }
- BUG();
-}
-
-static void remove_swap_bdev(struct block_device *bdev)
-{
- int i;
-
- for (i = 0; i < MAX_SWAPFILES; i++) {
- if (swap_bdevs[i] == bdev) {
- memcpy(&swap_bdevs[i], &swap_bdevs[i + 1],
- (MAX_SWAPFILES - i - 1) * sizeof(*swap_bdevs));
- swap_bdevs[MAX_SWAPFILES - 1] = NULL;
- return;
- }
- }
- BUG();
-}
-
-/*
- * Unlike a standard unplug_io_fn, swap_unplug_io_fn is never called
- * through swap's backing_dev_info (which is only used by shrink_list),
- * but directly from sync_page when PageSwapCache: and takes the page
- * as argument, so that it can find the right device from swp_entry_t.
- */
-void swap_unplug_io_fn(struct page *page)