Commit 3125c95e authored by Hongbo Li's avatar Hongbo Li Committed by Kent Overstreet

bcachefs: fast exit when darray_make_room failed

In downgrade_table_extra, the return value is needed. When it
return failed, we should exit immediately.

Fixes: 7773df19 ("bcachefs: metadata version bucket_stripe_sectors")
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 951dd86e
...@@ -353,7 +353,9 @@ int bch2_sb_downgrade_update(struct bch_fs *c) ...@@ -353,7 +353,9 @@ int bch2_sb_downgrade_update(struct bch_fs *c)
for (unsigned i = 0; i < src->nr_errors; i++) for (unsigned i = 0; i < src->nr_errors; i++)
dst->errors[i] = cpu_to_le16(src->errors[i]); dst->errors[i] = cpu_to_le16(src->errors[i]);
downgrade_table_extra(c, &table); ret = downgrade_table_extra(c, &table);
if (ret)
goto out;
if (!dst->recovery_passes[0] && if (!dst->recovery_passes[0] &&
!dst->recovery_passes[1] && !dst->recovery_passes[1] &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment