From 2e2242afe304cdfebda619c855f1d9c36b41a42b Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Thu, 27 Feb 2020 14:57:32 -0500 Subject: [PATCH] mm: Get rid of maple tree whitespace changes Nothing here makes any difference to the generated code. Signed-off-by: Matthew Wilcox (Oracle) --- mm/mmap.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 38e2f54bc662..0ada68154f07 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -315,7 +315,8 @@ static inline unsigned long vma_compute_gap(struct vm_area_struct *vma) } return gap; } -#if defined(CONFIG_DEBUG_VM_RB) + +#ifdef CONFIG_DEBUG_VM_RB static unsigned long vma_compute_subtree_gap(struct vm_area_struct *vma) { unsigned long max = vma_compute_gap(vma), subtree_gap; @@ -474,6 +475,7 @@ static void validate_mm_rb(struct rb_root *root, struct vm_area_struct *ignore) vma); } } + static void validate_mm(struct mm_struct *mm) { int bug = 0; @@ -505,7 +507,7 @@ static void validate_mm(struct mm_struct *mm) } if (highest_address != mm->highest_vm_end) { pr_emerg("mm->highest_vm_end %lx, found %lx\n", - mm->highest_vm_end, highest_address); + mm->highest_vm_end, highest_address); bug = 1; } i = browse_rb(mm); @@ -863,6 +865,7 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, mm->map_count++; validate_mm(mm); } + /* * Helper for vma_adjust() in the split_vma insert case: insert a vma into the * mm's list and rbtree. It has already been inserted into the interval tree. @@ -876,7 +879,6 @@ static void __insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma) if (find_vma_links(mm, vma->vm_start, vma->vm_end, &prev, &rb_link, &rb_parent)) BUG(); - __vma_link(mm, vma, prev, rb_link, rb_parent); mm->map_count++; } @@ -943,7 +945,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, } else { VM_WARN_ON(expand != vma); /* - * case 1, 6, 7: remove_next == 2 is case 6, + * case 1, 6, 7, remove_next == 2 is case 6, * remove_next == 1 is case 1 or 7. */ remove_next = 1 + (end > next->vm_end); @@ -1112,7 +1114,6 @@ again: } else { if (start_changed) vma_gap_update(vma); - if (end_changed) { if (!next) mm->highest_vm_end = vm_end_gap(vma); @@ -1131,6 +1132,7 @@ again: if (file) { i_mmap_unlock_write(mapping); uprobe_mmap(vma); + if (adjust_next) uprobe_mmap(next); } @@ -1951,6 +1953,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr, /* Clear old maps, set up prev, rb_link, rb_parent, and uf */ if (munmap_vma_range(mm, addr, len, &prev, &rb_link, &rb_parent, uf)) return -ENOMEM; + /* * Private writable mapping: check memory availability */ @@ -2604,10 +2607,8 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) VM_BUG_ON_VMA((unsigned long)ret != (unsigned long)mt_ret , ret); return ret; } - EXPORT_SYMBOL(find_vma); - /** * mt_find_vma_prev() - Find the VMA for a given address, or the next vma and * sets %pprev to the previous VMA, if any. @@ -2635,7 +2636,6 @@ mt_find_vma_prev(struct mm_struct *mm, unsigned long addr, /* * Same as find_vma, but also return a pointer to the previous VMA in *pprev. */ - struct vm_area_struct * rb_find_vma_prev(struct mm_struct *mm, unsigned long addr, struct vm_area_struct **pprev) @@ -2648,13 +2648,11 @@ rb_find_vma_prev(struct mm_struct *mm, unsigned long addr, } else { struct rb_node *rb_node = rb_last(&mm->mm_rb); - *pprev = rb_node ? - rb_entry(rb_node, struct vm_area_struct, vm_rb) : NULL; + *pprev = rb_node ? rb_entry(rb_node, struct vm_area_struct, vm_rb) : NULL; } return vma; } - struct vm_area_struct * find_vma_prev(struct mm_struct *mm, unsigned long addr, struct vm_area_struct **pprev) @@ -2667,6 +2665,7 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr, VM_BUG_ON_VMA(mt_prev != *pprev, *pprev); return ret; } + /* * Verify that the stack growth is acceptable and * update accounting. This is shared with both the @@ -2820,7 +2819,6 @@ int expand_downwards(struct vm_area_struct *vma, if (address < mmap_min_addr) return -EPERM; - /* Enforce stack_guard_gap */ prev = vma->vm_prev; /* Check that both stack segments have the same anon_vma? */ @@ -3412,7 +3410,6 @@ static int do_brk_flags(unsigned long addr, unsigned long len, unsigned long fla if (munmap_vma_range(mm, addr, len, &prev, &rb_link, &rb_parent, uf)) return -ENOMEM; - /* Check against address space limits *after* clearing old maps... */ if (!may_expand_vm(mm, flags, len >> PAGE_SHIFT)) return -ENOMEM; -- 2.50.1