aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/swap.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 259e96c150ef..fed5e8e1104b 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -129,9 +129,10 @@ enum {
129 129
130#define SWAP_CLUSTER_MAX 32 130#define SWAP_CLUSTER_MAX 32
131 131
132#define SWAP_MAP_MAX 0x7fff 132#define SWAP_MAP_MAX 0x7ffe
133#define SWAP_MAP_BAD 0x8000 133#define SWAP_MAP_BAD 0x7fff
134 134#define SWAP_HAS_CACHE 0x8000 /* There is a swap cache of entry. */
135#define SWAP_COUNT_MASK (~SWAP_HAS_CACHE)
135/* 136/*
136 * The in-memory structure used to track swap areas. 137 * The in-memory structure used to track swap areas.
137 */ 138 */
@@ -281,7 +282,7 @@ extern long total_swap_pages;
281extern void si_swapinfo(struct sysinfo *); 282extern void si_swapinfo(struct sysinfo *);
282extern swp_entry_t get_swap_page(void); 283extern swp_entry_t get_swap_page(void);
283extern swp_entry_t get_swap_page_of_type(int); 284extern swp_entry_t get_swap_page_of_type(int);
284extern int swap_duplicate(swp_entry_t); 285extern void swap_duplicate(swp_entry_t);
285extern int swapcache_prepare(swp_entry_t); 286extern int swapcache_prepare(swp_entry_t);
286extern int valid_swaphandles(swp_entry_t, unsigned long *); 287extern int valid_swaphandles(swp_entry_t, unsigned long *);
287extern void swap_free(swp_entry_t); 288extern void swap_free(swp_entry_t);
@@ -353,9 +354,12 @@ static inline void show_swap_cache_info(void)
353} 354}
354 355
355#define free_swap_and_cache(swp) is_migration_entry(swp) 356#define free_swap_and_cache(swp) is_migration_entry(swp)
356#define swap_duplicate(swp) is_migration_entry(swp)
357#define swapcache_prepare(swp) is_migration_entry(swp) 357#define swapcache_prepare(swp) is_migration_entry(swp)
358 358
359static inline void swap_duplicate(swp_entry_t swp)
360{
361}
362
359static inline void swap_free(swp_entry_t swp) 363static inline void swap_free(swp_entry_t swp)
360{ 364{
361} 365}