diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-03-26 07:04:56 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-07 20:40:35 +0300 |
commit | 09e913f5826936c0f6632d6d0d35a36295fac7cc (patch) | |
tree | 322fad0f064c644cc8320552d467d7234396315a /fs/bcachefs/dirent.h | |
parent | 30e615a2ce6601d85729caefd8ac15634f848e59 (diff) | |
download | linux-09e913f5826936c0f6632d6d0d35a36295fac7cc.tar.xz |
bcachefs: fix the count of nr_freed_pcpu after changing bc->freed_nonpcpu list
When allocating bkey_cached from bc->freed_pcpu list, it missed
decreasing the count of nr_freed_pcpu which would cause the mismatch
between the value of nr_freed_pcpu and the list items. This problem
also exists in moving new bkey_cached to bc->freed_pcpu list.
If these happened, the bug info may appear in
bch2_fs_btree_key_cache_exit by the follow code:
BUG_ON(list_count_nodes(&bc->freed_pcpu) != bc->nr_freed_pcpu);
BUG_ON(list_count_nodes(&bc->freed_nonpcpu) != bc->nr_freed_nonpcpu);
Fixes: c65c13f0eac6 ("bcachefs: Run btree key cache shrinker less aggressively")
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/dirent.h')
0 files changed, 0 insertions, 0 deletions