aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mm.h41
1 files changed, 22 insertions, 19 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7ff54242c5d7..df80e63903b5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -223,24 +223,27 @@ struct page {
223 * & limit reverse map searches. 223 * & limit reverse map searches.
224 */ 224 */
225 union { 225 union {
226 unsigned long private; /* Mapping-private opaque data: 226 struct {
227 * usually used for buffer_heads 227 unsigned long private; /* Mapping-private opaque data:
228 * if PagePrivate set; used for 228 * usually used for buffer_heads
229 * swp_entry_t if PageSwapCache 229 * if PagePrivate set; used for
230 * When page is free, this indicates 230 * swp_entry_t if PageSwapCache.
231 * order in the buddy system. 231 * When page is free, this
232 */ 232 * indicates order in the buddy
233 * system.
234 */
235 struct address_space *mapping; /* If low bit clear, points to
236 * inode address_space, or NULL.
237 * If page mapped as anonymous
238 * memory, low bit is set, and
239 * it points to anon_vma object:
240 * see PAGE_MAPPING_ANON below.
241 */
242 };
233#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS 243#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
234 spinlock_t ptl; 244 spinlock_t ptl;
235#endif 245#endif
236 } u; 246 };
237 struct address_space *mapping; /* If low bit clear, points to
238 * inode address_space, or NULL.
239 * If page mapped as anonymous
240 * memory, low bit is set, and
241 * it points to anon_vma object:
242 * see PAGE_MAPPING_ANON below.
243 */
244 pgoff_t index; /* Our offset within mapping. */ 247 pgoff_t index; /* Our offset within mapping. */
245 struct list_head lru; /* Pageout list, eg. active_list 248 struct list_head lru; /* Pageout list, eg. active_list
246 * protected by zone->lru_lock ! 249 * protected by zone->lru_lock !
@@ -261,8 +264,8 @@ struct page {
261#endif /* WANT_PAGE_VIRTUAL */ 264#endif /* WANT_PAGE_VIRTUAL */
262}; 265};
263 266
264#define page_private(page) ((page)->u.private) 267#define page_private(page) ((page)->private)
265#define set_page_private(page, v) ((page)->u.private = (v)) 268#define set_page_private(page, v) ((page)->private = (v))
266 269
267/* 270/*
268 * FIXME: take this include out, include page-flags.h in 271 * FIXME: take this include out, include page-flags.h in
@@ -815,7 +818,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
815 * overflow into the next struct page (as it might with DEBUG_SPINLOCK). 818 * overflow into the next struct page (as it might with DEBUG_SPINLOCK).
816 * When freeing, reset page->mapping so free_pages_check won't complain. 819 * When freeing, reset page->mapping so free_pages_check won't complain.
817 */ 820 */
818#define __pte_lockptr(page) &((page)->u.ptl) 821#define __pte_lockptr(page) &((page)->ptl)
819#define pte_lock_init(_page) do { \ 822#define pte_lock_init(_page) do { \
820 spin_lock_init(__pte_lockptr(_page)); \ 823 spin_lock_init(__pte_lockptr(_page)); \
821} while (0) 824} while (0)