aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-02-17 03:27:41 -0500
committerIngo Molnar <mingo@elte.hu>2012-02-17 04:18:07 -0500
commit7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89 (patch)
tree23987f194dcd91b0ba6d27f7f6e08c178797488e /mm
parent2b144498350860b6ee9dc57ff27a93ad488de5dc (diff)
uprobes/core: Clean up, refactor and improve the code
Make the uprobes code readable to me: - improve the Kconfig text so that a mere mortal gets some idea what CONFIG_UPROBES=y is really about - do trivial renames to standardize around the uprobes_*() namespace - clean up and simplify various code flow details - separate basic blocks of functionality - line break artifact and white space related removal - use standard local varible definition blocks - use vertical spacing to make things more readable - remove unnecessary volatile - restructure comment blocks to make them more uniform and more readable in general Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Anton Arapov <anton@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Link: http://lkml.kernel.org/n/tip-ewbwhb8o6navvllsauu7k07p@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r--mm/mmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 1aed183636d7..5a863d328a44 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -618,10 +618,10 @@ again: remove_next = 1 + (end > next->vm_end);
618 mutex_unlock(&mapping->i_mmap_mutex); 618 mutex_unlock(&mapping->i_mmap_mutex);
619 619
620 if (root) { 620 if (root) {
621 mmap_uprobe(vma); 621 uprobe_mmap(vma);
622 622
623 if (adjust_next) 623 if (adjust_next)
624 mmap_uprobe(next); 624 uprobe_mmap(next);
625 } 625 }
626 626
627 if (remove_next) { 627 if (remove_next) {
@@ -646,7 +646,7 @@ again: remove_next = 1 + (end > next->vm_end);
646 } 646 }
647 } 647 }
648 if (insert && file) 648 if (insert && file)
649 mmap_uprobe(insert); 649 uprobe_mmap(insert);
650 650
651 validate_mm(mm); 651 validate_mm(mm);
652 652
@@ -1340,7 +1340,7 @@ out:
1340 } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK)) 1340 } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK))
1341 make_pages_present(addr, addr + len); 1341 make_pages_present(addr, addr + len);
1342 1342
1343 if (file && mmap_uprobe(vma)) 1343 if (file && uprobe_mmap(vma))
1344 /* matching probes but cannot insert */ 1344 /* matching probes but cannot insert */
1345 goto unmap_and_free_vma; 1345 goto unmap_and_free_vma;
1346 1346
@@ -2301,7 +2301,7 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
2301 security_vm_enough_memory_mm(mm, vma_pages(vma))) 2301 security_vm_enough_memory_mm(mm, vma_pages(vma)))
2302 return -ENOMEM; 2302 return -ENOMEM;
2303 2303
2304 if (vma->vm_file && mmap_uprobe(vma)) 2304 if (vma->vm_file && uprobe_mmap(vma))
2305 return -EINVAL; 2305 return -EINVAL;
2306 2306
2307 vma_link(mm, vma, prev, rb_link, rb_parent); 2307 vma_link(mm, vma, prev, rb_link, rb_parent);
@@ -2374,7 +2374,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
2374 if (new_vma->vm_file) { 2374 if (new_vma->vm_file) {
2375 get_file(new_vma->vm_file); 2375 get_file(new_vma->vm_file);
2376 2376
2377 if (mmap_uprobe(new_vma)) 2377 if (uprobe_mmap(new_vma))
2378 goto out_free_mempol; 2378 goto out_free_mempol;
2379 2379
2380 if (vma->vm_flags & VM_EXECUTABLE) 2380 if (vma->vm_flags & VM_EXECUTABLE)