diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-26 23:31:49 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:05 -0400 |
commit | b3591acc3bc25d120dd9cb72f462e009e046a254 (patch) | |
tree | 0308dda91b4c880e3e5f10c6c55f194fe8c5be73 /fs/bcachefs/btree_key_cache.c | |
parent | 0ce4e0e759614ec19b140e8f19a67305c01cca78 (diff) | |
download | linux-b3591acc3bc25d120dd9cb72f462e009e046a254.tar.gz linux-b3591acc3bc25d120dd9cb72f462e009e046a254.tar.bz2 linux-b3591acc3bc25d120dd9cb72f462e009e046a254.zip |
bcachefs: unregister_shrinker() now safe on not-registered shrinker
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_key_cache.c')
-rw-r--r-- | fs/bcachefs/btree_key_cache.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c index 37beb75e2571..5f00688d46f1 100644 --- a/fs/bcachefs/btree_key_cache.c +++ b/fs/bcachefs/btree_key_cache.c @@ -955,8 +955,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc) int cpu; #endif - if (bc->shrink.list.next) - unregister_shrinker(&bc->shrink); + unregister_shrinker(&bc->shrink); mutex_lock(&bc->lock); |