diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-11 17:47:39 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:46 -0400 |
commit | f526d26d711a376aa3dd8dd56f55928d5a28d9b1 (patch) | |
tree | 32d5b2438ea70966ef7226336bf91b4a6975c7bf /fs/bcachefs/btree_key_cache.c | |
parent | 6a747c4683803abb01ce246ac2faf7f171cb3872 (diff) | |
download | lwn-f526d26d711a376aa3dd8dd56f55928d5a28d9b1.tar.gz lwn-f526d26d711a376aa3dd8dd56f55928d5a28d9b1.zip |
bcachefs: Fix btree key cache shutdown
On emergency shutdown, we might still have dirty keys in the btree key
cache that need to be cleaned up properly.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
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, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c index 4c61324f59d4..8b5e690a4d83 100644 --- a/fs/bcachefs/btree_key_cache.c +++ b/fs/bcachefs/btree_key_cache.c @@ -490,6 +490,9 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc) list_splice(&bc->dirty, &bc->clean); list_for_each_entry_safe(ck, n, &bc->clean, list) { + bch2_journal_pin_drop(&c->journal, &ck->journal); + bch2_journal_preres_put(&c->journal, &ck->res); + kfree(ck->k); kfree(ck); bc->nr_keys--; |