mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
[linux-block.git] / kernel / trace / trace_output.c
index 9a121e147102d2c5dab67ea626bd7461f969e35d..73976de7f8cc814e5f5f2b5155a127750ca8cfcf 100644 (file)
@@ -393,7 +393,7 @@ static int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
        if (mm) {
                const struct vm_area_struct *vma;
 
-               down_read(&mm->mmap_sem);
+               mmap_read_lock(mm);
                vma = find_vma(mm, ip);
                if (vma) {
                        file = vma->vm_file;
@@ -405,7 +405,7 @@ static int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
                                trace_seq_printf(s, "[+0x%lx]",
                                                 ip - vmstart);
                }
-               up_read(&mm->mmap_sem);
+               mmap_read_unlock(mm);
        }
        if (ret && ((sym_flags & TRACE_ITER_SYM_ADDR) || !file))
                trace_seq_printf(s, " <" IP_FMT ">", ip);