Skip to content

Commit 3125c95

Browse files
Hongbo LiKent Overstreet
authored andcommitted
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: 7773df1 ("bcachefs: metadata version bucket_stripe_sectors") Signed-off-by: Hongbo Li <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
1 parent 951dd86 commit 3125c95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/bcachefs/sb-downgrade.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ int bch2_sb_downgrade_update(struct bch_fs *c)
353353
for (unsigned i = 0; i < src->nr_errors; i++)
354354
dst->errors[i] = cpu_to_le16(src->errors[i]);
355355

356-
downgrade_table_extra(c, &table);
356+
ret = downgrade_table_extra(c, &table);
357+
if (ret)
358+
goto out;
357359

358360
if (!dst->recovery_passes[0] &&
359361
!dst->recovery_passes[1] &&

0 commit comments

Comments
 (0)