diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/swap.h | 64 |
1 files changed, 53 insertions, 11 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 1cf234e8df55..f1a827a972e0 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -282,18 +282,60 @@ static inline void disable_swap_token(void) | |||
282 | #define free_pages_and_swap_cache(pages, nr) \ | 282 | #define free_pages_and_swap_cache(pages, nr) \ |
283 | release_pages((pages), (nr), 0); | 283 | release_pages((pages), (nr), 0); |
284 | 284 | ||
285 | #define show_swap_cache_info() /*NOTHING*/ | 285 | static inline void show_swap_cache_info(void) |
286 | #define free_swap_and_cache(swp) /*NOTHING*/ | 286 | { |
287 | #define swap_duplicate(swp) /*NOTHING*/ | 287 | } |
288 | #define swap_free(swp) /*NOTHING*/ | 288 | |
289 | #define read_swap_cache_async(swp,vma,addr) NULL | 289 | static inline void free_swap_and_cache(swp_entry_t swp) |
290 | #define lookup_swap_cache(swp) NULL | 290 | { |
291 | #define valid_swaphandles(swp, off) 0 | 291 | } |
292 | |||
293 | static inline int swap_duplicate(swp_entry_t swp) | ||
294 | { | ||
295 | return 0; | ||
296 | } | ||
297 | |||
298 | static inline void swap_free(swp_entry_t swp) | ||
299 | { | ||
300 | } | ||
301 | |||
302 | static inline struct page *read_swap_cache_async(swp_entry_t swp, | ||
303 | struct vm_area_struct *vma, unsigned long addr) | ||
304 | { | ||
305 | return NULL; | ||
306 | } | ||
307 | |||
308 | static inline struct page *lookup_swap_cache(swp_entry_t swp) | ||
309 | { | ||
310 | return NULL; | ||
311 | } | ||
312 | |||
313 | static inline int valid_swaphandles(swp_entry_t entry, unsigned long *offset) | ||
314 | { | ||
315 | return 0; | ||
316 | } | ||
317 | |||
292 | #define can_share_swap_page(p) (page_mapcount(p) == 1) | 318 | #define can_share_swap_page(p) (page_mapcount(p) == 1) |
293 | #define move_to_swap_cache(p, swp) 1 | 319 | |
294 | #define move_from_swap_cache(p, i, m) 1 | 320 | static inline int move_to_swap_cache(struct page *page, swp_entry_t entry) |
295 | #define __delete_from_swap_cache(p) /*NOTHING*/ | 321 | { |
296 | #define delete_from_swap_cache(p) /*NOTHING*/ | 322 | return 1; |
323 | } | ||
324 | |||
325 | static inline int move_from_swap_cache(struct page *page, unsigned long index, | ||
326 | struct address_space *mapping) | ||
327 | { | ||
328 | return 1; | ||
329 | } | ||
330 | |||
331 | static inline void __delete_from_swap_cache(struct page *page) | ||
332 | { | ||
333 | } | ||
334 | |||
335 | static inline void delete_from_swap_cache(struct page *page) | ||
336 | { | ||
337 | } | ||
338 | |||
297 | #define swap_token_default_timeout 0 | 339 | #define swap_token_default_timeout 0 |
298 | 340 | ||
299 | static inline int remove_exclusive_swap_page(struct page *p) | 341 | static inline int remove_exclusive_swap_page(struct page *p) |