mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
bcachefs: unregister_shrinker() now safe on not-registered shrinker
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
0ce4e0e759
commit
b3591acc3b
2 changed files with 2 additions and 4 deletions
|
@ -398,8 +398,7 @@ 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: */
|
||||||
flags = memalloc_nofs_save();
|
flags = memalloc_nofs_save();
|
||||||
|
|
|
@ -955,8 +955,7 @@ 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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue