Lines Matching defs:entry
74 static int __add_to_swap_cache(struct page *page, swp_entry_t entry)
84 set_page_private(page, entry.val);
87 error = radix_tree_insert(&swapper_space.page_tree, entry.val, page);
111 int add_to_swap_cache(struct page *page, swp_entry_t entry, gfp_t gfp_mask)
117 error = __add_to_swap_cache(page, entry);
150 swp_entry_t entry;
156 entry = get_swap_page();
157 if (!entry.val)
171 err = add_to_swap_cache(page, entry,
182 swapcache_free(entry, NULL);
195 swp_entry_t entry;
197 entry.val = page_private(page);
203 swapcache_free(entry, page);
255 * Lookup a swap entry in the swap cache. A found page will be returned
260 struct page * lookup_swap_cache(swp_entry_t entry)
264 page = find_get_page(&swapper_space, entry.val);
277 * the swap entry is no longer in use.
279 struct page *read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
291 found_page = find_get_page(&swapper_space, entry.val);
312 * Swap entry may have been freed since our caller observed it.
314 err = swapcache_prepare(entry);
319 if (err) { /* swp entry is obsolete ? */
327 err = __add_to_swap_cache(new_page, entry);
344 swapcache_free(entry, NULL);
354 * @entry: swap entry of this memory
359 * Returns the struct page for entry and addr, after queueing swapin.
371 struct page *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask,
386 nr_pages = valid_swaphandles(entry, &offset);
389 page = read_swap_cache_async(swp_entry(swp_type(entry), offset),
396 return read_swap_cache_async(entry, gfp_mask, vma, addr);