mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
apparmor: cleanup remove unused percpu critical sections in buffer management
There are two unused percpu critical sections in the buffer management code. These are remanents from when a more complex hold algorithm was used. Remove them, as they serve no purpose. Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
0b6a6b72b3
commit
859b725579
|
|
@ -2174,9 +2174,6 @@ char *aa_get_buffer(bool in_atomic)
|
|||
cache_hold_inc(&cache->hold);
|
||||
put_cpu_ptr(&aa_local_buffers);
|
||||
spin_lock(&aa_buffers_lock);
|
||||
} else {
|
||||
cache = get_cpu_ptr(&aa_local_buffers);
|
||||
put_cpu_ptr(&aa_local_buffers);
|
||||
}
|
||||
retry:
|
||||
if (buffer_count > reserve_count ||
|
||||
|
|
@ -2231,8 +2228,6 @@ void aa_put_buffer(char *buf)
|
|||
list_add(&aa_buf->list, &aa_global_buffers);
|
||||
buffer_count++;
|
||||
spin_unlock(&aa_buffers_lock);
|
||||
cache = get_cpu_ptr(&aa_local_buffers);
|
||||
put_cpu_ptr(&aa_local_buffers);
|
||||
return;
|
||||
}
|
||||
/* contention on global list, fallback to percpu */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user