diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-04 07:35:29 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-04 19:14:50 -0500 |
commit | 9fc4b5d675cd6dc0b2503abe95b1c761d8d05abe (patch) | |
tree | b547922481166d5279170a5bce58e58c03dcbbfc /libbcachefs/alloc_foreground.c | |
parent | 1ee7dc7a55273d34358a0ee525a9e823c999ffe6 (diff) |
rust: Fix ptr casting in Fs::open()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/alloc_foreground.c')
-rw-r--r-- | libbcachefs/alloc_foreground.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbcachefs/alloc_foreground.c b/libbcachefs/alloc_foreground.c index af1c1e2..b2755c1 100644 --- a/libbcachefs/alloc_foreground.c +++ b/libbcachefs/alloc_foreground.c @@ -754,6 +754,7 @@ static int bucket_alloc_from_stripe(struct btree_trans *trans, unsigned nr_replicas, unsigned *nr_effective, bool *have_cache, + enum alloc_reserve reserve, unsigned flags, struct closure *cl) { @@ -771,9 +772,7 @@ static int bucket_alloc_from_stripe(struct btree_trans *trans, if (ec_open_bucket(c, ptrs)) return 0; - h = bch2_ec_stripe_head_get(trans, target, 0, nr_replicas - 1, - wp == &c->copygc_write_point, - cl); + h = bch2_ec_stripe_head_get(trans, target, 0, nr_replicas - 1, reserve, cl); if (IS_ERR(h)) return PTR_ERR(h); if (!h) @@ -958,7 +957,8 @@ static int __open_bucket_add_buckets(struct btree_trans *trans, ret = bucket_alloc_from_stripe(trans, ptrs, wp, &devs, target, nr_replicas, nr_effective, - have_cache, flags, _cl); + have_cache, + reserve, flags, _cl); } else { retry_blocking: /* |