提交 bd6dace7 编写于 作者: T Tejun Heo 提交者: Linus Torvalds

mm: move swp_entry_t definition to include/linux/mm_types.h

swp_entry_t being defined in include/linux/swap.h instead of
include/linux/mm_types.h causes cyclic include dependency later when
include/linux/page_cgroup.h is included from writeback path.  Move the
definition to include/linux/mm_types.h.

While at it, reformat the comment above it.
Signed-off-by: NTejun Heo <tj@kernel.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 71fbd556
...@@ -534,4 +534,12 @@ enum tlb_flush_reason { ...@@ -534,4 +534,12 @@ enum tlb_flush_reason {
NR_TLB_FLUSH_REASONS, NR_TLB_FLUSH_REASONS,
}; };
/*
* A swap entry has to fit into a "unsigned long", as the entry is hidden
* in the "index" field of the swapper address space.
*/
typedef struct {
unsigned long val;
} swp_entry_t;
#endif /* _LINUX_MM_TYPES_H */ #endif /* _LINUX_MM_TYPES_H */
...@@ -102,14 +102,6 @@ union swap_header { ...@@ -102,14 +102,6 @@ union swap_header {
} info; } info;
}; };
/* A swap entry has to fit into a "unsigned long", as
* the entry is hidden in the "index" field of the
* swapper address space.
*/
typedef struct {
unsigned long val;
} swp_entry_t;
/* /*
* current->reclaim_state points to one of these when a task is running * current->reclaim_state points to one of these when a task is running
* memory reclaim * memory reclaim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册