Commit b3591acc authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: unregister_shrinker() now safe on not-registered shrinker

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0ce4e0e7
...@@ -398,7 +398,6 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c) ...@@ -398,7 +398,6 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
struct btree *b; struct btree *b;
unsigned i, flags; unsigned i, flags;
if (bc->shrink.list.next)
unregister_shrinker(&bc->shrink); unregister_shrinker(&bc->shrink);
/* vfree() can allocate memory: */ /* vfree() can allocate memory: */
......
...@@ -955,7 +955,6 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc) ...@@ -955,7 +955,6 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
int cpu; int cpu;
#endif #endif
if (bc->shrink.list.next)
unregister_shrinker(&bc->shrink); unregister_shrinker(&bc->shrink);
mutex_lock(&bc->lock); mutex_lock(&bc->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