diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-08-27 15:00:59 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:39 -0400 |
commit | f5178b34b9f1b53d2a97a2a210d3c284966428e4 (patch) | |
tree | e93234a184b27646a8bde72dc3013dfb8216bd9b /fs/bcachefs/six.c | |
parent | 674cfc26240b7807f078a23a4f04681ccae49b02 (diff) | |
download | linux-f5178b34b9f1b53d2a97a2a210d3c284966428e4.tar.gz linux-f5178b34b9f1b53d2a97a2a210d3c284966428e4.tar.bz2 linux-f5178b34b9f1b53d2a97a2a210d3c284966428e4.zip |
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>
Diffstat (limited to 'fs/bcachefs/six.c')
-rw-r--r-- | fs/bcachefs/six.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/bcachefs/six.c b/fs/bcachefs/six.c index 464b1313d358..0ab72f59d23b 100644 --- a/fs/bcachefs/six.c +++ b/fs/bcachefs/six.c @@ -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)); |