[PATCH 2/3] Revert "mm: only make map_swap_entry available for CONFIG_HIBERNATION"
Chris Wilson
chris at chris-wilson.co.uk
Tue Mar 2 14:21:13 UTC 2021
This reverts commit 3e3126cf2a6d0afa4c013574df621d08f08d3912.
---
mm/swapfile.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 40d23cbee52e..7b9a033783f8 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -47,6 +47,7 @@
static bool swap_count_continued(struct swap_info_struct *, pgoff_t,
unsigned char);
static void free_swap_count_continuations(struct swap_info_struct *);
+static sector_t map_swap_entry(swp_entry_t, struct block_device**);
DEFINE_SPINLOCK(swap_lock);
static unsigned int nr_swapfiles;
@@ -1790,9 +1791,6 @@ int free_swap_and_cache(swp_entry_t entry)
}
#ifdef CONFIG_HIBERNATION
-
-static sector_t map_swap_entry(swp_entry_t, struct block_device**);
-
/*
* Find the swap type that corresponds to given device (if any).
*
@@ -2284,7 +2282,6 @@ static void drain_mmlist(void)
spin_unlock(&mmlist_lock);
}
-#ifdef CONFIG_HIBERNATION
/*
* Use this swapdev's extent info to locate the (PAGE_SIZE) block which
* corresponds to page offset for the specified swap entry.
@@ -2304,7 +2301,6 @@ static sector_t map_swap_entry(swp_entry_t entry, struct block_device **bdev)
se = offset_to_swap_extent(sis, offset);
return se->start_block + (offset - se->start_page);
}
-#endif
/*
* Free all of a swapdev's extent information
--
2.20.1
More information about the Intel-gfx-trybot
mailing list