diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-05-07 20:43:43 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:03 -0400 |
commit | 3a402c8dabf11142d78d0f6174b50db6ba846c4e (patch) | |
tree | 5bdb84c3f734a1a74a9332f31d368f922d33f2a9 /fs/bcachefs/alloc_background.c | |
parent | 5bc38f44fa8e938044bb3b69c8881f3682fe97f6 (diff) | |
download | linux-3a402c8dabf11142d78d0f6174b50db6ba846c4e.tar.gz linux-3a402c8dabf11142d78d0f6174b50db6ba846c4e.tar.bz2 linux-3a402c8dabf11142d78d0f6174b50db6ba846c4e.zip |
bcachefs: Fix some refcounting bugs
We really need debug mode assertions that ca->ref and ca->io_ref are
used correctly.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 996b1afd1380..791066b6b39b 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -371,7 +371,7 @@ int bch2_alloc_write(struct bch_fs *c, unsigned flags) ret = bch2_alloc_write_key(&trans, iter, flags); if (ret) { - percpu_ref_put(&ca->io_ref); + percpu_ref_put(&ca->ref); goto err; } bch2_btree_iter_next_slot(iter); |