summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-02-28 22:33:06 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:16 -0400
commit1633e492ce07e26af58b11dd26039bf7c0080c96 (patch)
tree9d795f3fbbd8f23a86863aef7ba786a5e19988d5 /fs/bcachefs/recovery.c
parent6409c6a0aea95c78e353141f1855c11fcff0950c (diff)
downloadlwn-1633e492ce07e26af58b11dd26039bf7c0080c96.tar.gz
lwn-1633e492ce07e26af58b11dd26039bf7c0080c96.zip
bcachefs: improved flush_held_btree_writes()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 5ceab8c14d72..fdc64e199f8b 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -413,11 +413,13 @@ int bch2_fs_initialize(struct bch_fs *c)
bch2_btree_root_alloc(c, i);
err = "unable to allocate journal buckets";
- for_each_online_member(ca, c, i)
- if (bch2_dev_journal_alloc(ca)) {
+ for_each_online_member(ca, c, i) {
+ ret = bch2_dev_journal_alloc(ca);
+ if (ret) {
percpu_ref_put(&ca->io_ref);
goto err;
}
+ }
/*
* journal_res_get() will crash if called before this has