Commit b0cbf659 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix an allocator error path

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 000de459
...@@ -838,15 +838,17 @@ struct write_point *bch2_alloc_sectors_start(struct bch_fs *c, ...@@ -838,15 +838,17 @@ struct write_point *bch2_alloc_sectors_start(struct bch_fs *c,
{ {
struct write_point *wp; struct write_point *wp;
struct open_bucket *ob; struct open_bucket *ob;
unsigned nr_effective = 0; struct open_buckets ptrs;
struct open_buckets ptrs = { .nr = 0 }; unsigned nr_effective, write_points_nr;
bool have_cache = false; bool have_cache;
unsigned write_points_nr; int ret, i;
int ret = 0, i;
BUG_ON(!nr_replicas || !nr_replicas_required); BUG_ON(!nr_replicas || !nr_replicas_required);
retry: retry:
ptrs.nr = 0;
nr_effective = 0;
write_points_nr = c->write_points_nr; write_points_nr = c->write_points_nr;
have_cache = false;
wp = writepoint_find(c, write_point.v); wp = writepoint_find(c, write_point.v);
......
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