提交 9ae5b3c7 编写于 作者: O Olaf Hering 提交者: Linus Torvalds

[PATCH] remove linux/pagemap.h from linux/swap.h

sparc can not include linux/pagemap.h because of the following circular
dependency:

asm-sparc/pgtable include linux/swap.h
linux/swap.h include now linux/pagemap.h
linux/pagemap.h include linux/mm.h
linux/mm.h include asm/pgtable.h

It needs to have the swp_entry_t type fully visible in pgtable.h,
we can't work around this using macros.
Signed-off-by: NOlaf Hering <olh@suse.de>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 46bdac99
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pagemap.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -255,6 +254,8 @@ static inline void put_swap_token(struct mm_struct *mm) ...@@ -255,6 +254,8 @@ static inline void put_swap_token(struct mm_struct *mm)
#define si_swapinfo(val) \ #define si_swapinfo(val) \
do { (val)->freeswap = (val)->totalswap = 0; } while (0) do { (val)->freeswap = (val)->totalswap = 0; } while (0)
/* only sparc can not include linux/pagemap.h in this file
* so leave page_cache_release and release_pages undeclared... */
#define free_page_and_swap_cache(page) \ #define free_page_and_swap_cache(page) \
page_cache_release(page) page_cache_release(page)
#define free_pages_and_swap_cache(pages, nr) \ #define free_pages_and_swap_cache(pages, nr) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册