diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-09-24 03:42:24 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-28 03:46:34 +0200 |
commit | 3125c95ea69141c4cbbde854674c90531034ec47 (patch) | |
tree | e3e0663d438d6a3fde6fad963dbf28e148d5b212 | |
parent | bcachefs: Fix iterator leak in check_subvol() (diff) | |
download | linux-3125c95ea69141c4cbbde854674c90531034ec47.tar.xz linux-3125c95ea69141c4cbbde854674c90531034ec47.zip |
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: 7773df19c35f ("bcachefs: metadata version bucket_stripe_sectors")
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/sb-downgrade.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c index c7e4cdd3f6a5..6f0493f79959 100644 --- a/fs/bcachefs/sb-downgrade.c +++ b/fs/bcachefs/sb-downgrade.c @@ -353,7 +353,9 @@ int bch2_sb_downgrade_update(struct bch_fs *c) for (unsigned i = 0; i < src->nr_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] && !dst->recovery_passes[1] && |