Lines Matching refs:page
24 static int swap_writepage(struct page *page) in swap_writepage() argument
26 if (remove_exclusive_swap_page(page)) { in swap_writepage()
27 UnlockPage(page); in swap_writepage()
30 rw_swap_page(WRITE, page); in swap_writepage()
70 int add_to_swap_cache(struct page *page, swp_entry_t entry) in add_to_swap_cache() argument
72 if (page->mapping) in add_to_swap_cache()
78 if (add_to_page_cache_unique(page, &swapper_space, entry.val, in add_to_swap_cache()
84 if (!PageLocked(page)) in add_to_swap_cache()
86 if (!PageSwapCache(page)) in add_to_swap_cache()
96 void __delete_from_swap_cache(struct page *page) in __delete_from_swap_cache() argument
98 if (!PageLocked(page)) in __delete_from_swap_cache()
100 if (!PageSwapCache(page)) in __delete_from_swap_cache()
102 ClearPageDirty(page); in __delete_from_swap_cache()
103 __remove_inode_page(page); in __delete_from_swap_cache()
113 void delete_from_swap_cache(struct page *page) in delete_from_swap_cache() argument
117 if (!PageLocked(page)) in delete_from_swap_cache()
120 if (unlikely(!block_flushpage(page, 0))) in delete_from_swap_cache()
123 entry.val = page->index; in delete_from_swap_cache()
126 __delete_from_swap_cache(page); in delete_from_swap_cache()
130 page_cache_release(page); in delete_from_swap_cache()
138 void free_page_and_swap_cache(struct page *page) in free_page_and_swap_cache() argument
148 if (PageSwapCache(page) && !TryLockPage(page)) { in free_page_and_swap_cache()
149 remove_exclusive_swap_page(page); in free_page_and_swap_cache()
150 UnlockPage(page); in free_page_and_swap_cache()
152 page_cache_release(page); in free_page_and_swap_cache()
161 struct page * lookup_swap_cache(swp_entry_t entry) in lookup_swap_cache()
163 struct page *found; in lookup_swap_cache()
184 struct page * read_swap_cache_async(swp_entry_t entry) in read_swap_cache_async()
186 struct page *found_page, *new_page = NULL; in read_swap_cache_async()