Commit 0d2234a7 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

six locks: Kill six_lock_pcpu_(alloc|free)



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>
parent 01bf56a9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment