diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-17 10:34:05 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 19:47:42 +0300 |
commit | 41b84fb489f7707af4490d1e5e22d88f3207da71 (patch) | |
tree | 0805e6dfa3fb10f71463c31b016615fb9cf45622 /fs/bcachefs/sb-members.c | |
parent | 9fea2274f783a39ba54727571e5e669c947ddd39 (diff) | |
download | linux-41b84fb489f7707af4490d1e5e22d88f3207da71.tar.xz |
bcachefs: for_each_member_device_rcu() now declares loop iter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-members.c')
-rw-r--r-- | fs/bcachefs/sb-members.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/bcachefs/sb-members.c b/fs/bcachefs/sb-members.c index 259af07f4624..7c5db669a467 100644 --- a/fs/bcachefs/sb-members.c +++ b/fs/bcachefs/sb-members.c @@ -358,14 +358,12 @@ const struct bch_sb_field_ops bch_sb_field_ops_members_v2 = { void bch2_sb_members_from_cpu(struct bch_fs *c) { struct bch_sb_field_members_v2 *mi = bch2_sb_field_get(c->disk_sb.sb, members_v2); - struct bch_dev *ca; - unsigned i, e; rcu_read_lock(); - for_each_member_device_rcu(ca, c, i, NULL) { - struct bch_member *m = __bch2_members_v2_get_mut(mi, i); + for_each_member_device_rcu(c, ca, NULL) { + struct bch_member *m = __bch2_members_v2_get_mut(mi, ca->dev_idx); - for (e = 0; e < BCH_MEMBER_ERROR_NR; e++) + for (unsigned e = 0; e < BCH_MEMBER_ERROR_NR; e++) m->errors[e] = cpu_to_le64(atomic64_read(&ca->errors[e])); } rcu_read_unlock(); |