diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-24 05:02:45 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 19:47:42 +0300 |
commit | 037a2d9f48285bf3bfed0f55f1aee04d8b329d07 (patch) | |
tree | 5a26b7c20b64037e90eedb6116e3756c98273efb /fs/bcachefs/alloc_foreground.c | |
parent | defd9e39b59961ea0fd774020fb5c05dba199412 (diff) | |
download | linux-037a2d9f48285bf3bfed0f55f1aee04d8b329d07.tar.xz |
bcachefs: simplify bch_devs_list
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index d99f38c1e7f9..f41cfd966447 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -970,8 +970,8 @@ static int __open_bucket_add_buckets(struct btree_trans *trans, devs = target_rw_devs(c, wp->data_type, target); /* Don't allocate from devices we already have pointers to: */ - for (i = 0; i < devs_have->nr; i++) - __clear_bit(devs_have->devs[i], devs.d); + darray_for_each(*devs_have, i) + __clear_bit(*i, devs.d); open_bucket_for_each(c, ptrs, ob, i) __clear_bit(ob->dev, devs.d); |