diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index e2fa375e478e..3b09444121d9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -199,6 +199,10 @@ struct vm_operations_struct { | |||
199 | void (*close)(struct vm_area_struct * area); | 199 | void (*close)(struct vm_area_struct * area); |
200 | struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); | 200 | struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type); |
201 | int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); | 201 | int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); |
202 | |||
203 | /* notification that a previously read-only page is about to become | ||
204 | * writable, if an error is returned it will cause a SIGBUS */ | ||
205 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); | ||
202 | #ifdef CONFIG_NUMA | 206 | #ifdef CONFIG_NUMA |
203 | int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new); | 207 | int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new); |
204 | struct mempolicy *(*get_policy)(struct vm_area_struct *vma, | 208 | struct mempolicy *(*get_policy)(struct vm_area_struct *vma, |
@@ -465,10 +469,13 @@ static inline unsigned long page_zonenum(struct page *page) | |||
465 | struct zone; | 469 | struct zone; |
466 | extern struct zone *zone_table[]; | 470 | extern struct zone *zone_table[]; |
467 | 471 | ||
472 | static inline int page_zone_id(struct page *page) | ||
473 | { | ||
474 | return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK; | ||
475 | } | ||
468 | static inline struct zone *page_zone(struct page *page) | 476 | static inline struct zone *page_zone(struct page *page) |
469 | { | 477 | { |
470 | return zone_table[(page->flags >> ZONETABLE_PGSHIFT) & | 478 | return zone_table[page_zone_id(page)]; |
471 | ZONETABLE_MASK]; | ||
472 | } | 479 | } |
473 | 480 | ||
474 | static inline unsigned long page_to_nid(struct page *page) | 481 | static inline unsigned long page_to_nid(struct page *page) |