Commit f5178b34 authored by Kent Overstreet's avatar Kent Overstreet

six locks: Delete six_lock_pcpu_free_rcu()

Didn't have any users, and wasn't a good idea to begin with - delete it.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 674cfc26
......@@ -712,34 +712,6 @@ void six_lock_wakeup_all(struct six_lock *lock)
}
EXPORT_SYMBOL_GPL(six_lock_wakeup_all);
struct free_pcpu_rcu {
struct rcu_head rcu;
void __percpu *p;
};
static void free_pcpu_rcu_fn(struct rcu_head *_rcu)
{
struct free_pcpu_rcu *rcu =
container_of(_rcu, struct free_pcpu_rcu, rcu);
free_percpu(rcu->p);
kfree(rcu);
}
void six_lock_pcpu_free_rcu(struct six_lock *lock)
{
struct free_pcpu_rcu *rcu = kzalloc(sizeof(*rcu), GFP_KERNEL);
if (!rcu)
return;
rcu->p = lock->readers;
lock->readers = NULL;
call_rcu(&rcu->rcu, free_pcpu_rcu_fn);
}
EXPORT_SYMBOL_GPL(six_lock_pcpu_free_rcu);
void six_lock_pcpu_free(struct six_lock *lock)
{
BUG_ON(lock->readers && pcpu_read_count(lock));
......
......@@ -201,7 +201,6 @@ void six_lock_increment(struct six_lock *, enum six_lock_type);
void six_lock_wakeup_all(struct six_lock *);
void six_lock_pcpu_free_rcu(struct six_lock *);
void six_lock_pcpu_free(struct six_lock *);
void six_lock_pcpu_alloc(struct six_lock *);
......
Markdown is supported
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