summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-08-27 15:00:59 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-03-13 11:34:35 -0400
commit1c9e5da7b2125d09ca6f3bcecc60c652146ce01a (patch)
treeb8e2eaf3a135131b0b6fb33fe10042f62903fdfe
parent120becbe8a5d2c8a27e3a1fdd4f5e2bf06bd4c42 (diff)
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: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--include/linux/six.h1
-rw-r--r--kernel/locking/six.c28
2 files changed, 0 insertions, 29 deletions
diff --git a/include/linux/six.h b/include/linux/six.h
index 52e668cb7be9..6cec7ecdd156 100644
--- a/include/linux/six.h
+++ b/include/linux/six.h
@@ -196,7 +196,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 *);
diff --git a/kernel/locking/six.c b/kernel/locking/six.c
index 4350ed408fe9..9ad42b4a9c40 100644
--- a/kernel/locking/six.c
+++ b/kernel/locking/six.c
@@ -711,34 +711,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));