summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-12-13 01:55:35 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 21:42:47 +0100
commitbd6dace78b9e4595d29892f806514518449c7489 (patch)
tree5ddeaccaf220668c85fbce6a1dfb679ad0fc80e3
parentmemory-hotplug: remove redundant call of page_to_pfn (diff)
downloadlinux-bd6dace78b9e4595d29892f806514518449c7489.tar.xz
linux-bd6dace78b9e4595d29892f806514518449c7489.zip
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: Tejun Heo <tj@kernel.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/mm_types.h8
-rw-r--r--include/linux/swap.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index bf9f57529dcf..fc2daffa9db1 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -534,4 +534,12 @@ enum tlb_flush_reason {
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 */
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 37a585beef5c..34e8b60ab973 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -102,14 +102,6 @@ union swap_header {
} 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
* memory reclaim