]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf: Remove redundant aux_unlock label
authorPeter Zijlstra <peterz@infradead.org>
Tue, 12 Aug 2025 10:39:05 +0000 (12:39 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 15 Aug 2025 11:13:00 +0000 (13:13 +0200)
unlock and aux_unlock are now identical, remove the aux_unlock one.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Link: https://lore.kernel.org/r/20250812104019.131293512@infradead.org
kernel/events/core.c

index dfe09b0332739d3348065f77a1939f8979ceea70..89fb069913d07532610468a513d7c766541529f0 100644 (file)
@@ -7098,7 +7098,7 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
 
                rb = event->rb;
                if (!rb)
-                       goto aux_unlock;
+                       goto unlock;
 
                aux_mutex = &rb->aux_mutex;
                mutex_lock(aux_mutex);
@@ -7107,27 +7107,27 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
                aux_size = READ_ONCE(rb->user_page->aux_size);
 
                if (aux_offset < perf_data_size(rb) + PAGE_SIZE)
-                       goto aux_unlock;
+                       goto unlock;
 
                if (aux_offset != vma->vm_pgoff << PAGE_SHIFT)
-                       goto aux_unlock;
+                       goto unlock;
 
                /* already mapped with a different offset */
                if (rb_has_aux(rb) && rb->aux_pgoff != vma->vm_pgoff)
-                       goto aux_unlock;
+                       goto unlock;
 
                if (aux_size != nr_pages * PAGE_SIZE)
-                       goto aux_unlock;
+                       goto unlock;
 
                /* already mapped with a different size */
                if (rb_has_aux(rb) && rb->aux_nr_pages != nr_pages)
-                       goto aux_unlock;
+                       goto unlock;
 
                if (!is_power_of_2(nr_pages))
-                       goto aux_unlock;
+                       goto unlock;
 
                if (!atomic_inc_not_zero(&rb->mmap_count))
-                       goto aux_unlock;
+                       goto unlock;
 
                if (rb_has_aux(rb)) {
                        atomic_inc(&rb->aux_mmap_count);
@@ -7161,7 +7161,6 @@ aux_success:
        }
 
 unlock:
-aux_unlock:
        if (aux_mutex)
                mutex_unlock(aux_mutex);
        mutex_unlock(&event->mmap_mutex);