• Kent Overstreet's avatar
    six locks: Kill six_lock_pcpu_(alloc|free) · 0d2234a7
    Kent Overstreet authored
    six_lock_pcpu_alloc() is an unsafe interface: it's not safe to allocate
    or free the percpu reader count on an existing lock that's in use, the
    only safe time to allocate percpu readers is when the lock is first
    being initialized.
    
    This patch adds a flags parameter to six_lock_init(), and instead of
    six_lock_pcpu_free() we now expose six_lock_exit(), which does the same
    thing but is less likely to be misused.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    0d2234a7
six.c 21.2 KB