diff options
| author | Rajesh Venkatasubramanian <vrajesh@umich.edu> | 2004-08-22 22:56:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:56:55 -0700 |
| commit | e66c6753333b9c2b1cf5daf0b73814b5fdb09c41 (patch) | |
| tree | 9cbeae75fc154c6aedd7a291565f8541e44ae509 /include/linux/mm.h | |
| parent | 2caed7c7a77f4529255cc218faaf70390f3d0001 (diff) | |
[PATCH] prio_tree: kill vma_prio_tree_init()
vma_prio_tree_insert() relies on the fact, that vma was
vma_prio_tree_init()'ed.
Content of vma->shared should be considered undefined, until this vma is
inserted into i_mmap/i_mmap_nonlinear. It's better to do proper
initialization in vma_prio_tree_add/insert.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Rajesh Venkatasubramanian <vrajesh@umich.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 5c584ccededa..0e30d4079c8a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -598,14 +598,6 @@ extern void show_mem(void); extern void si_meminfo(struct sysinfo * val); extern void si_meminfo_node(struct sysinfo *val, int nid); -static inline void vma_prio_tree_init(struct vm_area_struct *vma) -{ - vma->shared.vm_set.list.next = NULL; - vma->shared.vm_set.list.prev = NULL; - vma->shared.vm_set.parent = NULL; - vma->shared.vm_set.head = NULL; -} - /* prio_tree.c */ void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); @@ -614,6 +606,13 @@ struct vm_area_struct *vma_prio_tree_next( struct vm_area_struct *, struct prio_tree_root *, struct prio_tree_iter *, pgoff_t begin, pgoff_t end); +static inline void vma_nonlinear_insert(struct vm_area_struct *vma, + struct list_head *list) +{ + vma->shared.vm_set.parent = NULL; + list_add_tail(&vma->shared.vm_set.list, list); +} + /* mmap.c */ extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert); |
