six locks: Delete six_lock_pcpu_free_rcu()
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 27 Aug 2022 19:00:59 +0000 (15:00 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:39 +0000 (17:09 -0400)
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>
fs/bcachefs/six.c
fs/bcachefs/six.h

index 464b1313d358ca322603490033252749083fe52f..0ab72f59d23b2335f88ebb78a5822a2f6a1c9dc0 100644 (file)
@@ -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));
index 59d796cfde436099e3ea8e300b6a3ad96c3f029c..6c9ac82d146d06b7bf3476b1a61636aca2c360e3 100644 (file)
@@ -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 *);