diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-03-28 03:18:47 -0800 |
|---|---|---|
| committer | Dave Jones <davej@tetrachloride.(none)> | 2003-03-28 03:18:47 -0800 |
| commit | 09efe93ddcd52808ace23ceaea7477097fb4b6e6 (patch) | |
| tree | 09c4fab9755dbc316999ea931ba144425ee990c3 /include/linux | |
| parent | 255373b8a43ae64b8c1cae97059ab63884a669a8 (diff) | |
[PATCH] permit page unmapping if !CONFIG_SWAP
From: Hugh Dickins <hugh@veritas.com>
Raised #endif CONFIG_SWAP in shrink_list, it was excluding
try_to_unmap of file pages. Suspect !CONFIG_MMU relied on
that to suppress try_to_unmap, added SWAP_FAIL stub for it.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/swap.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index ab76302894fd..a2a294961dca 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -178,19 +178,18 @@ struct pte_chain *FASTCALL(page_add_rmap(struct page *, pte_t *, void FASTCALL(page_remove_rmap(struct page *, pte_t *)); int FASTCALL(try_to_unmap(struct page *)); -/* return values of try_to_unmap */ -#define SWAP_SUCCESS 0 -#define SWAP_AGAIN 1 -#define SWAP_FAIL 2 - /* linux/mm/shmem.c */ extern int shmem_unuse(swp_entry_t entry, struct page *page); - #else -#define page_referenced(page) \ - TestClearPageReferenced(page) +#define page_referenced(page) TestClearPageReferenced(page) +#define try_to_unmap(page) SWAP_FAIL #endif /* CONFIG_MMU */ +/* return values of try_to_unmap */ +#define SWAP_SUCCESS 0 +#define SWAP_AGAIN 1 +#define SWAP_FAIL 2 + #ifdef CONFIG_SWAP /* linux/mm/page_io.c */ extern int swap_readpage(struct file *, struct page *); |
