summaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-02-17 09:27:41 +0100
committerIngo Molnar <mingo@elte.hu>2012-02-17 10:18:07 +0100
commit7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89 (patch)
tree23987f194dcd91b0ba6d27f7f6e08c178797488e /mm/mmap.c
parent2b144498350860b6ee9dc57ff27a93ad488de5dc (diff)
downloadop-kernel-dev-7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89.zip
op-kernel-dev-7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89.tar.gz
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/mmap.c')
-rw-r--r--mm/mmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 1aed183..5a863d3 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -618,10 +618,10 @@ again: remove_next = 1 + (end > next->vm_end);
mutex_unlock(&mapping->i_mmap_mutex);
if (root) {
- mmap_uprobe(vma);
+ uprobe_mmap(vma);
if (adjust_next)
- mmap_uprobe(next);
+ uprobe_mmap(next);
}
if (remove_next) {
@@ -646,7 +646,7 @@ again: remove_next = 1 + (end > next->vm_end);
}
}
if (insert && file)
- mmap_uprobe(insert);
+ uprobe_mmap(insert);
validate_mm(mm);
@@ -1340,7 +1340,7 @@ out:
} else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK))
make_pages_present(addr, addr + len);
- if (file && mmap_uprobe(vma))
+ if (file && uprobe_mmap(vma))
/* matching probes but cannot insert */
goto unmap_and_free_vma;
@@ -2301,7 +2301,7 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
- if (vma->vm_file && mmap_uprobe(vma))
+ if (vma->vm_file && uprobe_mmap(vma))
return -EINVAL;
vma_link(mm, vma, prev, rb_link, rb_parent);
@@ -2374,7 +2374,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (new_vma->vm_file) {
get_file(new_vma->vm_file);
- if (mmap_uprobe(new_vma))
+ if (uprobe_mmap(new_vma))
goto out_free_mempol;
if (vma->vm_flags & VM_EXECUTABLE)
OpenPOWER on IntegriCloud