mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-26 17:36:51 +08:00
perf: Reflow to get rid of aux_success label
Mostly re-indent noise needed to get rid of that label. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Link: https://lore.kernel.org/r/20250812104019.362581570@infradead.org
This commit is contained in:
@@ -7130,30 +7130,29 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
if (rb_has_aux(rb)) {
|
||||
atomic_inc(&rb->aux_mmap_count);
|
||||
ret = 0;
|
||||
goto aux_success;
|
||||
|
||||
} else {
|
||||
if (!perf_mmap_calc_limits(vma, &user_extra, &extra)) {
|
||||
ret = -EPERM;
|
||||
atomic_dec(&rb->mmap_count);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
WARN_ON(!rb && event->rb);
|
||||
|
||||
if (vma->vm_flags & VM_WRITE)
|
||||
flags |= RING_BUFFER_WRITABLE;
|
||||
|
||||
ret = rb_alloc_aux(rb, event, vma->vm_pgoff, nr_pages,
|
||||
event->attr.aux_watermark, flags);
|
||||
if (ret) {
|
||||
atomic_dec(&rb->mmap_count);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
atomic_set(&rb->aux_mmap_count, 1);
|
||||
rb->aux_mmap_locked = extra;
|
||||
}
|
||||
|
||||
if (!perf_mmap_calc_limits(vma, &user_extra, &extra)) {
|
||||
ret = -EPERM;
|
||||
atomic_dec(&rb->mmap_count);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
WARN_ON(!rb && event->rb);
|
||||
|
||||
if (vma->vm_flags & VM_WRITE)
|
||||
flags |= RING_BUFFER_WRITABLE;
|
||||
|
||||
ret = rb_alloc_aux(rb, event, vma->vm_pgoff, nr_pages,
|
||||
event->attr.aux_watermark, flags);
|
||||
if (ret) {
|
||||
atomic_dec(&rb->mmap_count);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
atomic_set(&rb->aux_mmap_count, 1);
|
||||
rb->aux_mmap_locked = extra;
|
||||
aux_success:
|
||||
perf_mmap_account(vma, user_extra, extra);
|
||||
atomic_inc(&event->mmap_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user